[postgis-users] postgis 2.0 and postgist 2.1 compatibility issues

Paul Ramsey pramsey at cleverelephant.ca
Fri Dec 13 10:00:43 PST 2013


Yes, it sounds like a difference in the stats results, which
ST_EstimatedExtent leans upon, and likely QGIS uses for quick extent
determination. Checking the results of that function over the two
versions will confirm/deny hypothesis.

On Thu, Dec 12, 2013 at 6:26 PM, Paragon Corporation <lr at pcorp.us> wrote:
> Marty,
>
> Which version of PostGIS 2.1 are you running 2.1.0 or 2.1.1?
>
> Do a: SELECT postgis_full_version();
>
>
> Your example of two seemingly equivalent table creations resulting in
> different results is a bit troubling.
>
> When you say extent seems to be an issue but ST_Extent is not, I am assuming
> you are confirming this in QGIS or other software.  The only thing I could
> think of
> Is that the ST_EstimatedExtent answer might be different and I think various
> GIS software use that for extent estimation.
>
> Can you check the answer of ST_EstimatedExtent in both problem and
> non-problem case
>
> http://postgis.net/docs/manual-2.1/ST_Estimated_Extent.html
>
> If they are different, try running
>
> Vacuum analyze verbose new_roads2;
>
>
> Hope that helps,
> Regina
> http://www.postgis.us
> http://postgis.net
>
>
>
> -----Original Message-----
> From: postgis-users-bounces at lists.osgeo.org
> [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Marty O'Neill II
> Sent: Thursday, December 12, 2013 6:28 PM
> To: postgis-users at lists.osgeo.org
> Subject: [postgis-users] postgis 2.0 and postgist 2.1 compatibility issues
>
> I am running postgresql 9.1 with postgis 2.0 in Windows 7. After creating a
> dump from the database, I tried to restore on a machine running Ubuntu with
> postgresql 9.3 and postgis 2.1. However, the spatial extent is incorrect
> when viewed in QuantumGIS and in other custom GIS software. The spatial
> extent in QuantumGIS and our software seems to include a 0.0 coordinate.
> However, running ST_Extent on one of the problem tables does not reveal any
> such issues. There are no empty records. We have tried PostGIS_DropBBox(),
> Populate_Geometry_Columns(), and reindexing the tables. We have tried
> generating the dump and restoring it both from pgAdmin and using the command
> line.  The projections are correctly set on all records, and the tables have
> valid entries in the geometry_columns view.
>
> Let roads be one of the problematic tables. If we execute the following
> query
>
> SELECT * INTO new_roads FROM roads;
>
> ... then the problem with the spatial extent does not exist on table
> new_roads. However, if we execute the query
>
> SELECT * INTO new_roads2 FROM (SELECT * FROM roads) AS temp;
>
> .. then the problem continues to exist on table new_roads2
>
> We suspect that the issue may be due to compatibility issues between PostGIS
> 2.0 and 2.1. Does anybody have any ideas on why this is happening?
>
> Thank you,
>
> Marty
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


More information about the postgis-users mailing list