[QGIS Commit] r14150 - trunk/qgis/src/providers/postgres
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Thu Aug 26 14:44:09 EDT 2010
Author: jef
Date: 2010-08-26 18:44:09 +0000 (Thu, 26 Aug 2010)
New Revision: 14150
Modified:
trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
Log:
fix for postgis data crossing the dateline
Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp 2010-08-26 01:30:49 UTC (rev 14149)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp 2010-08-26 18:44:09 UTC (rev 14150)
@@ -2839,7 +2839,18 @@
.arg( quotedValue( geometryColumn ) );
result = connectionRO->PQexec( sql );
if ( PQresultStatus( result ) == PGRES_TUPLES_OK && PQntuples( result ) == 1 )
+ {
ext = PQgetvalue( result, 0, 0 );
+
+ // fix for what might be a postgis bug: when the extent crosses the
+ // dateline extent() returns -180 to 180 (which appears right), but
+ // estimated_extent() returns eastern bound of data (>-180) and
+ // 180 degrees.
+ if ( ext.contains( ",180 " ) )
+ {
+ ext.clear();
+ }
+ }
}
}
else
More information about the QGIS-commit
mailing list