GeoTools

Error calculating extents of a PostGIS Point Layer using PostGIS-NG

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.6-M1
  • Fix Version/s: None
  • Component/s: jdbc
  • Labels:
    None
  • Environment:
    Windows XP , JDK 1.6

Description

While calculating the extents of the postgis point layer an error was thrown due to invalid extent calculation through the postgis envelope function.The attached patch fixes the issue by using a more robust estimated_extent function.

Issue Links

Activity

Hide
Andrea Aime added a comment -
This patch is not acceptable, as the estimated_extent function can return wildly wrong extents (typical case, USA with the haway, the islands are not taken into consideration).
I agree on adding support for that function, but only when set with a flag like in the old postgis datastore.

As for the normal extents, are you by any chance using a postgis 1.4 preview build? They screwed up the normal extent function and to my understanding they are going to fix it as well.
Show
Andrea Aime added a comment - This patch is not acceptable, as the estimated_extent function can return wildly wrong extents (typical case, USA with the haway, the islands are not taken into consideration). I agree on adding support for that function, but only when set with a flag like in the old postgis datastore. As for the normal extents, are you by any chance using a postgis 1.4 preview build? They screwed up the normal extent function and to my understanding they are going to fix it as well.
Hide
Andrea Aime added a comment -
Here is a issue in which there is some discussion on the extent function in postgis 1.4
Show
Andrea Aime added a comment - Here is a issue in which there is some discussion on the extent function in postgis 1.4
Hide
Andrea Aime added a comment -
If the error is happening in postgis < 1.3 could you post the full stack trace of what's going on?
Show
Andrea Aime added a comment - If the error is happening in postgis < 1.3 could you post the full stack trace of what's going on?
Hide
Andrea Aime added a comment -
Hi Debasish, I've been playing with postgis-ng in GeoServer lately and I had no issues calculating the bboxes? But I have Postgres 8.3.7 here.
If you have a way for me to reproduce the issue I can look into it. So far neither GeoServer nor the jdbc-ng unit tests are catching anything.
Show
Andrea Aime added a comment - Hi Debasish, I've been playing with postgis-ng in GeoServer lately and I had no issues calculating the bboxes? But I have Postgres 8.3.7 here. If you have a way for me to reproduce the issue I can look into it. So far neither GeoServer nor the jdbc-ng unit tests are catching anything.
Hide
Andrea Aime added a comment -
And oh, here is the postgis version:

postgis=# select postgis_version();
            postgis_version
---------------------------------------
 1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
(1 riga)

Show
Andrea Aime added a comment - And oh, here is the postgis version: postgis=# select postgis_version();             postgis_version ---------------------------------------  1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1 (1 riga)
Hide
Andrea Aime added a comment -
We have a flag to use estimated extents now
Show
Andrea Aime added a comment - We have a flag to use estimated extents now

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: