[gdal-dev] OGR is not able to determine PostGIS table SRS
Sorokine, Alexandre
sorokina at ornl.gov
Wed Jul 8 12:24:36 EDT 2009
Frank,
> Actually, I suspect the debug facilities in trunk for the OGR PG driver
> have been upgraded. Would it be practical for you to try things with trunk?
I did some more debugging with the version from the trunk checked out around
10AM EST today. I compiled it on OSX with macports as:
/configure --prefix=/Users/sorokine/Documents/appl/gdalsvninst
--with-pg=/opt/local/lib/postgresql83/bin/pg_config
--with-netcdf=/opt/local --enable-debug && make -j7 && make install
Results of running ogrinfo are in the file in the attachment (ogrinfo with
debug plus postgresql staements from logs). My observations is that trunk
version solves some of the problems but other problems persist:
1. Trunk version (compared to 1.6.0) properly sets SRID for the WHERE
clause with the bounding box:
PG: OGRPGTableLayer::BuildWhere returns: WHERE "the_geom" &&
SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000
71.406242000000)'::box3d,4326)
Compare to 1.6.0:
PG: OGRPGTableLayer::BuildWhere returns: WHERE the_geom &&
SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000
71.406242000000)'::box3d,-1)
2. Trunk version does NOT fix reporting of SRS through
OGR_L_GetSpatialRef(layer) or OGR_F_GetSpatialReferemce(feature), both
return NULL. I've tested it in my code and you can see that in trunk
ogrinfo output:
Layer SRS WKT:
(unknown)
3. Trunk version doe not properly set bounding box SRS through
OGR_L_SetSpatialFilterRect() function. I've tested it in my code. Bounding
box works in ogrinfo but ogrinfo does not use this function (it builds a
geometry).
I hope we will be able to fix it,
On 7/7/09 11:10 PM, "Frank Warmerdam" <warmerdam at pobox.com> wrote:
> Sorokine, Alexandre wrote:
>> Franks,
>>
>> Thank you for your reply, I did some more checks. Please see my comments
>> below.
>
> Alexandre,
>
> I'm still wondering if this is related to schemas. I was surprised to not
> see any queries against the spatial_ref_sys table. In my trunk build I see
> something like:
>
> PG: PQexec(SELECT srtext FROM spatial_ref_sys WHERE srid = 4326) =
> PGRES_TUPLES_OK, ntuples = 1
>
>
> Best regards,
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial Programmer for Rent
>
>
--
Alex Sorokine
mailto:SorokinA at ornl.gov
-------------- next part --------------
===== gdal svn trunk
$ CPL_DEBUG=ON ../gdalsvninst/bin/ogrinfo -al -ro PG:'host=geodb dbname=usa tables=census.counties' -spat -178.217606 18.921785 -66.969269 71.406242 | head -80
PG: DBName="usa"
PG: PQexec(SELECT version()) = PGRES_TUPLES_OK, ntuples = 1
PG: PostgreSQL version string : 'PostgreSQL 8.3.7 on x86_64-pc-linux-gnu, compiled by GCC cc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu3)'
PG: PQexec(BEGIN) = PGRES_COMMAND_OK
PG: PQexec(SELECT oid FROM pg_type WHERE typname = 'geometry') = PGRES_TUPLES_OK, ntuples = 1
PG: PQexec(SELECT postgis_version()) = PGRES_TUPLES_OK, ntuples = 1
PG: PostGIS version string : '1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1'
PG: PQexec(SET ENABLE_SEQSCAN = ON) = PGRES_COMMAND_OK
PG: PQexec(COMMIT) = PGRES_COMMAND_OK
PG: PQexec(SELECT current_schema()) = PGRES_TUPLES_OK, ntuples = 1
PG: PQexec(SELECT a.attname, a.attnum, t.typname, t.typname = ANY(ARRAY['int2','int4','serial']) AS isfid FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n, pg_index i WHERE a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid AND c.relnamespace = n.oid AND c.oid = i.indrelid AND i.indisprimary = 't' AND t.typname !~ '^geom' AND c.relname = 'counties' AND (i.indkey[0]=a.attnum OR i.indkey[1]=a.attnum OR i.indkey[2]=a.attnum OR i.indkey[3]=a.attnum OR i.indkey[4]=a.attnum OR i.indkey[5]=a.attnum OR i.indkey[6]=a.attnum OR i.indkey[7]=a.attnum OR i.indkey[8]=a.attnum OR i.indkey[9]=a.attnum) AND n.nspname='census' ORDER BY a.attnum) = PGRES_TUPLES_OK, ntuples = 1
PG: Primary key name (FID): gid
PG: PQexec(BEGIN) = PGRES_COMMAND_OK
PG: PQexec(DECLARE mycursor CURSOR for SELECT DISTINCT a.attname, t.typname, a.attlen, format_type(a.atttypid,a.atttypmod) FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE c.relname = 'counties' AND a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid AND c.relnamespace=n.oid AND n.nspname='census') = PGRES_COMMAND_OK
PG: PQexec(FETCH ALL in mycursor) = PGRES_TUPLES_OK, ntuples = 51
PG: Using column 'gid' as FID for table 'counties'
PG: PQexec(CLOSE mycursor) = PGRES_COMMAND_OK
PG: PQexec(COMMIT) = PGRES_COMMAND_OK
PG: PQexec(SELECT type, coord_dimension, srid FROM geometry_columns WHERE f_table_name='counties' AND f_geometry_column='the_geom' AND f_table_schema='census') = PGRES_TUPLES_OK, ntuples = 1
PG: Layer 'counties' geometry type: MULTIPOLYGON:Multi Polygon, Dim=2
OGR: OGROpen(PG:host=geodb dbname=usa tables=census.counties/0x1700e50) succeeded as PostgreSQL.
OGR: GetLayerCount() = 1
PG: bHasPostGISGeometry == TRUE
PG: OGRPGTableLayer::BuildWhere returns: WHERE "the_geom" && SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000 71.406242000000)'::box3d,4326)
PG: PQexec(SELECT count(*) FROM "census"."counties" WHERE "the_geom" && SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000 71.406242000000)'::box3d,4326) ) = PGRES_TUPLES_OK, ntuples = 1
PG: PQexec(SELECT Extent("the_geom") FROM "census"."counties") = PGRES_TUPLES_OK, ntuples = 1
PG: PQexec(BEGIN) = PGRES_COMMAND_OK
PG: PQexec(SELECT srtext FROM spatial_ref_sys WHERE srid = 4326) = PGRES_TUPLES_OK, ntuples = 0
PG: PQexec(COMMIT) = PGRES_COMMAND_OK
PG: PQexec(BEGIN) = PGRES_COMMAND_OK
PG: PQexec(DECLARE OGRPGLayerReader CURSOR for SELECT "gid", AsEWKT("the_geom"), "age_18_21", "age_22_29", "age_30_39", "age_40_49", "age_50_64", "age_5_17", "age_65_up", "age_under5", "ameri_es", "asian", "ave_fam_sz", "ave_hh_sz", "avg_sale97", "avg_size97", "black", "cnty_fips", "crop_acr97", "families", "females", "fhh_child", "fips", "hawn_pi", "hispanic", "households", "hse_units", "hsehld_1_f", "hsehld_1_m", "males", "marhh_chd", "marhh_no_c", "med_age", "med_age_f", "med_age_m", "mhh_child", "mult_race", "name", "no_farms97", "other", "owner_occ", "pop00_sqmi", "pop07_sqmi", "pop2000", "pop2007", "renter_occ", "sqmi", "state_fips", "state_name", "vacant", "white" FROM "census"."counties" WHERE "the_geom" && SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000 71.406242000000)'::box3d,4326) ) = PGRES_COMMAND_OK
PG: PQexec(FETCH 500 in OGRPGLayerReader) = PGRES_TUPLES_OK, ntuples = 500
INFO: Open of `PG:host=geodb dbname=usa tables=census.counties'
using driver `PostgreSQL' successful.
INFO: Internal data source name `PG:host=geodb dbname=usa '
different from user name `PG:host=geodb dbname=usa tables=census.counties'.
Layer name: census.counties
Geometry: Multi Polygon
Feature Count: 3141
Extent: (-178.217606, 18.921785) - (-66.969269, 71.406242)
Layer SRS WKT:
(unknown)
FID Column = gid
Geometry Column = the_geom
age_18_21: Integer (0.0)
age_22_29: Integer (0.0)
age_30_39: Integer (0.0)
age_40_49: Integer (0.0)
age_50_64: Integer (0.0)
age_5_17: Integer (0.0)
age_65_up: Integer (0.0)
age_under5: Integer (0.0)
ameri_es: Integer (0.0)
asian: Integer (0.0)
ave_fam_sz: Real (0.0)
ave_hh_sz: Real (0.0)
avg_sale97: Real (0.0)
avg_size97: Integer (0.0)
black: Integer (0.0)
cnty_fips: String (3.0)
crop_acr97: Integer (0.0)
families: Integer (0.0)
females: Integer (0.0)
fhh_child: Integer (0.0)
fips: String (5.0)
hawn_pi: Integer (0.0)
hispanic: Integer (0.0)
households: Integer (0.0)
hse_units: Integer (0.0)
hsehld_1_f: Integer (0.0)
hsehld_1_m: Integer (0.0)
males: Integer (0.0)
marhh_chd: Integer (0.0)
marhh_no_c: Integer (0.0)
med_age: Real (0.0)
med_age_f: Real (0.0)
med_age_m: Real (0.0)
mhh_child: Integer (0.0)
mult_race: Integer (0.0)
name: String (32.0)
no_farms97: Integer (0.0)
other: Integer (0.0)
owner_occ: Integer (0.0)
pop00_sqmi: Real (0.0)
pop07_sqmi: Real (0.0)
pop2000: Integer (0.0)
pop2007: Integer (0.0)
renter_occ: Integer (0.0)
sqmi: Real (0.0)
state_fips: String (2.0)
state_name: String (25.0)
vacant: Integer (0.0)
white: Integer (0.0)
OGRFeature(census.counties):1
age_18_21 (Integer) = 149
age_22_29 (Integer) = 282
age_30_39 (Integer) = 588
....
==== statements from the postgresql log:
2009-07-08 12:03:21 EDT LOG: statement: set client_encoding to 'UNICODE'
2009-07-08 12:03:21 EDT LOG: statement: SELECT version()
2009-07-08 12:03:21 EDT LOG: statement: BEGIN
2009-07-08 12:03:21 EDT LOG: statement: SELECT oid FROM pg_type WHERE typname = 'geometry'
2009-07-08 12:03:21 EDT LOG: statement: SELECT postgis_version()
2009-07-08 12:03:21 EDT LOG: statement: SET ENABLE_SEQSCAN = ON
2009-07-08 12:03:21 EDT LOG: statement: COMMIT
2009-07-08 12:03:21 EDT LOG: statement: SELECT current_schema()
2009-07-08 12:03:21 EDT LOG: statement: SELECT a.attname, a.attnum, t.typname, t.typname = ANY(ARRAY['int2','int4','serial']) AS isfid FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n, pg_index i WHERE a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid AND c.relnamespace = n.oid AND c.oid = i.indrelid AND i.indisprimary = 't' AND t.typname !~ '^geom' AND c.relname = 'counties' AND (i.indkey[0]=a.attnum OR i.indkey[1]=a.attnum OR i.indkey[2]=a.attnum OR i.indkey[3]=a.attnum OR i.indkey[4]=a.attnum OR i.indkey[5]=a.attnum OR i.indkey[6]=a.attnum OR i.indkey[7]=a.attnum OR i.indkey[8]=a.attnum OR i.indkey[9]=a.attnum) AND n.nspname='census' ORDER BY a.attnum
2009-07-08 12:03:21 EDT LOG: statement: BEGIN
2009-07-08 12:03:21 EDT LOG: statement: DECLARE mycursor CURSOR for SELECT DISTINCT a.attname, t.typname, a.attlen, format_type(a.atttypid,a.atttypmod) FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE c.relname = 'counties' AND a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid AND c.relnamespace=n.oid AND n.nspname='census'
2009-07-08 12:03:21 EDT LOG: statement: FETCH ALL in mycursor
2009-07-08 12:03:21 EDT LOG: statement: CLOSE mycursor
2009-07-08 12:03:21 EDT LOG: statement: COMMIT
2009-07-08 12:03:21 EDT LOG: statement: SELECT type, coord_dimension, srid FROM geometry_columns WHERE f_table_name='counties' AND f_geometry_column='the_geom' AND f_table_schema='census'
2009-07-08 12:03:21 EDT LOG: statement: SELECT count(*) FROM "census"."counties" WHERE "the_geom" && SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000 71.406242000000)'::box3d,4326)
2009-07-08 12:03:21 EDT LOG: statement: SELECT Extent("the_geom") FROM "census"."counties"
2009-07-08 12:03:21 EDT LOG: statement: BEGIN
2009-07-08 12:03:21 EDT LOG: statement: SELECT srtext FROM spatial_ref_sys WHERE srid = 4326
2009-07-08 12:03:21 EDT LOG: statement: COMMIT
2009-07-08 12:03:21 EDT LOG: statement: BEGIN
2009-07-08 12:03:21 EDT LOG: statement: DECLARE OGRPGLayerReader CURSOR for SELECT "gid", AsEWKT("the_geom"), "age_18_21", "age_22_29", "age_30_39", "age_40_49", "age_50_64", "age_5_17", "age_65_up", "age_under5", "ameri_es", "asian", "ave_fam_sz", "ave_hh_sz", "avg_sale97", "avg_size97", "black", "cnty_fips", "crop_acr97", "families", "females", "fhh_child", "fips", "hawn_pi", "hispanic", "households", "hse_units", "hsehld_1_f", "hsehld_1_m", "males", "marhh_chd", "marhh_no_c", "med_age", "med_age_f", "med_age_m", "mhh_child", "mult_race", "name", "no_farms97", "other", "owner_occ", "pop00_sqmi", "pop07_sqmi", "pop2000", "pop2007", "renter_occ", "sqmi", "state_fips", "state_name", "vacant", "white" FROM "census"."counties" WHERE "the_geom" && SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000 71.406242000000)'::box3d,4326)
2009-07-08 12:03:21 EDT LOG: statement: FETCH 500 in OGRPGLayerReader
2009-07-08 12:03:21 EDT LOG: could not receive data from client: Connection reset by peer
2009-07-08 12:03:21 EDT LOG: unexpected EOF on client connection
==== for comparison gdal 1.6.0
$ CPL_DEBUG=ON ogrinfo -al -ro PG:'host=geodb dbname=usa tables=census.counties' -spat -178.217606 18.921785 -66.969269 71.406242 | head -80
PG: DBName="usa"
PG: PostgreSQL version string : 'PostgreSQL 8.3.7 on x86_64-pc-linux-gnu, compiled by GCC cc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu3)'
PG: PostGIS version string : '1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1'
PG: Primary key name (FID): gid
PG: Using column 'gid' as FID for table 'counties'
OGR: OGROpen(PG:host=geodb dbname=usa tables=census.counties/0x1000ad0) succeeded as PostgreSQL.
OGR: GetLayerCount() = 1
PG: bHasPostGISGeometry == TRUE
PG: OGRPGTableLayer::BuildWhere returns: WHERE the_geom && SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000 71.406242000000)'::box3d,-1)
PG: PQexec(SELECT count(*) FROM "census"."counties" WHERE the_geom && SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000 71.406242000000)'::box3d,-1) )
PG: SELECT count(*) FROM "census"."counties" WHERE the_geom && SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000 71.406242000000)'::box3d,-1) ; failed.
PG: PQexec(SELECT Extent("the_geom") FROM "census"."counties")
PG: PQexec(DECLARE OGRPGLayerReader CURSOR for SELECT "gid", AsEWKT("the_geom"), "age_18_21", "age_22_29", "age_30_39", "age_40_49", "age_50_64", "age_5_17", "age_65_up", "age_under5", "ameri_es", "asian", "ave_fam_sz", "ave_hh_sz", "avg_sale97", "avg_size97", "black", "cnty_fips", "crop_acr97", "families", "females", "fhh_child", "fips", "hawn_pi", "hispanic", "households", "hse_units", "hsehld_1_f", "hsehld_1_m", "males", "marhh_chd", "marhh_no_c", "med_age", "med_age_f", "med_age_m", "mhh_child", "mult_race", "name", "no_farms97", "other", "owner_occ", "pop00_sqmi", "pop07_sqmi", "pop2000", "pop2007", "renter_occ", "sqmi", "state_fips", "state_name", "vacant", "white" FROM "census"."counties" WHERE the_geom && SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000 71.406242000000)'::box3d,-1) )
PG: PQclear() on an error condition
INFO: Open of `PG:host=geodb dbname=usa tables=census.counties'
using driver `PostgreSQL' successful.
INFO: Internal data source name `PG:host=geodb dbname=usa '
different from user name `PG:host=geodb dbname=usa tables=census.counties'.
Layer name: census.counties
Geometry: Unknown (any)
Feature Count: 0
Extent: (-178.217606, 18.921785) - (-66.969269, 71.406242)
Layer SRS WKT:
(unknown)
FID Column = gid
Geometry Column = the_geom
age_18_21: Integer (0.0)
age_22_29: Integer (0.0)
age_30_39: Integer (0.0)
age_40_49: Integer (0.0)
age_50_64: Integer (0.0)
age_5_17: Integer (0.0)
age_65_up: Integer (0.0)
age_under5: Integer (0.0)
ameri_es: Integer (0.0)
asian: Integer (0.0)
ave_fam_sz: Real (0.0)
ave_hh_sz: Real (0.0)
avg_sale97: Real (0.0)
avg_size97: Integer (0.0)
black: Integer (0.0)
cnty_fips: String (3.0)
crop_acr97: Integer (0.0)
families: Integer (0.0)
females: Integer (0.0)
fhh_child: Integer (0.0)
fips: String (5.0)
hawn_pi: Integer (0.0)
hispanic: Integer (0.0)
households: Integer (0.0)
hse_units: Integer (0.0)
hsehld_1_f: Integer (0.0)
hsehld_1_m: Integer (0.0)
males: Integer (0.0)
marhh_chd: Integer (0.0)
marhh_no_c: Integer (0.0)
med_age: Real (0.0)
med_age_f: Real (0.0)
med_age_m: Real (0.0)
mhh_child: Integer (0.0)
mult_race: Integer (0.0)
name: String (32.0)
no_farms97: Integer (0.0)
other: Integer (0.0)
owner_occ: Integer (0.0)
pop00_sqmi: Real (0.0)
pop07_sqmi: Real (0.0)
pop2000: Integer (0.0)
pop2007: Integer (0.0)
renter_occ: Integer (0.0)
sqmi: Real (0.0)
state_fips: String (2.0)
state_name: String (25.0)
vacant: Integer (0.0)
white: Integer (0.0)
====== statements for postgresql log for gdal 1.6.0
2009-07-08 12:05:39 EDT LOG: statement: set client_encoding to 'UNICODE'
2009-07-08 12:05:39 EDT LOG: statement: SELECT version()
2009-07-08 12:05:39 EDT LOG: statement: BEGIN
2009-07-08 12:05:39 EDT LOG: statement: SELECT oid FROM pg_type WHERE typname = 'geometry'
2009-07-08 12:05:39 EDT LOG: statement: SELECT postgis_version()
2009-07-08 12:05:39 EDT LOG: statement: SET ENABLE_SEQSCAN = ON
2009-07-08 12:05:39 EDT LOG: statement: COMMIT
2009-07-08 12:05:39 EDT LOG: statement: SELECT current_schema()
2009-07-08 12:05:39 EDT LOG: statement: SELECT a.attname, a.attnum, t.typname, t.typname = ANY(ARRAY['int2','int4','serial']) AS isfid FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n, pg_index i WHERE a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid AND c.relnamespace = n.oid AND c.oid = i.indrelid AND i.indisprimary = 't' AND t.typname !~ '^geom' AND c.relname = 'counties' AND (i.indkey[0]=a.attnum OR i.indkey[1]=a.attnum OR i.indkey[2]=a.attnum OR i.indkey[3]=a.attnum OR i.indkey[4]=a.attnum OR i.indkey[5]=a.attnum OR i.indkey[6]=a.attnum OR i.indkey[7]=a.attnum OR i.indkey[8]=a.attnum OR i.indkey[9]=a.attnum) AND n.nspname='census' ORDER BY a.attnum
2009-07-08 12:05:39 EDT LOG: statement: BEGIN
2009-07-08 12:05:39 EDT LOG: statement: DECLARE mycursor CURSOR for SELECT DISTINCT a.attname, t.typname, a.attlen, format_type(a.atttypid,a.atttypmod) FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE c.relname = 'counties' AND a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid AND c.relnamespace=n.oid AND n.nspname='census'
2009-07-08 12:05:39 EDT LOG: statement: FETCH ALL in mycursor
2009-07-08 12:05:39 EDT LOG: statement: CLOSE mycursor
2009-07-08 12:05:39 EDT LOG: statement: COMMIT
2009-07-08 12:05:39 EDT LOG: statement: SELECT type, coord_dimension FROM geometry_columns WHERE f_table_name='counties' AND f_geometry_column='the_geom'
2009-07-08 12:05:39 EDT LOG: statement: SELECT pg_class.relname FROM pg_class WHERE oid = (SELECT pg_inherits.inhparent FROM pg_inherits WHERE inhrelid = (SELECT pg_class.oid FROM pg_class WHERE relname = 'counties'))
2009-07-08 12:05:39 EDT ERROR: more than one row returned by a subquery used as an expression
2009-07-08 12:05:39 EDT STATEMENT: SELECT pg_class.relname FROM pg_class WHERE oid = (SELECT pg_inherits.inhparent FROM pg_inherits WHERE inhrelid = (SELECT pg_class.oid FROM pg_class WHERE relname = 'counties'))
2009-07-08 12:05:39 EDT LOG: statement: BEGIN
2009-07-08 12:05:39 EDT LOG: statement: SELECT srid FROM geometry_columns WHERE f_table_name = 'counties' AND f_geometry_column = 'the_geom' AND f_table_schema = 'census'
2009-07-08 12:05:39 EDT LOG: statement: COMMIT
2009-07-08 12:05:39 EDT LOG: statement: BEGIN
2009-07-08 12:05:39 EDT LOG: statement: SELECT srtext FROM spatial_ref_sys WHERE srid = 4326
2009-07-08 12:05:39 EDT LOG: statement: COMMIT
2009-07-08 12:05:39 EDT LOG: statement: SELECT count(*) FROM "census"."counties" WHERE the_geom && SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000 71.406242000000)'::box3d,-1)
2009-07-08 12:05:39 EDT ERROR: Operation on two geometries with different SRIDs
2009-07-08 12:05:39 EDT STATEMENT: SELECT count(*) FROM "census"."counties" WHERE the_geom && SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000 71.406242000000)'::box3d,-1)
2009-07-08 12:05:39 EDT LOG: statement: SELECT Extent("the_geom") FROM "census"."counties"
2009-07-08 12:05:39 EDT LOG: statement: BEGIN
2009-07-08 12:05:39 EDT LOG: statement: DECLARE OGRPGLayerReader CURSOR for SELECT "gid", AsEWKT("the_geom"), "age_18_21", "age_22_29", "age_30_39", "age_40_49", "age_50_64", "age_5_17", "age_65_up", "age_under5", "ameri_es", "asian", "ave_fam_sz", "ave_hh_sz", "avg_sale97", "avg_size97", "black", "cnty_fips", "crop_acr97", "families", "females", "fhh_child", "fips", "hawn_pi", "hispanic", "households", "hse_units", "hsehld_1_f", "hsehld_1_m", "males", "marhh_chd", "marhh_no_c", "med_age", "med_age_f", "med_age_m", "mhh_child", "mult_race", "name", "no_farms97", "other", "owner_occ", "pop00_sqmi", "pop07_sqmi", "pop2000", "pop2007", "renter_occ", "sqmi", "state_fips", "state_name", "vacant", "white" FROM "census"."counties" WHERE the_geom && SetSRID('BOX3D(-178.217606000000 18.921785000000, -66.969269000000 71.406242000000)'::box3d,-1)
2009-07-08 12:05:39 EDT LOG: statement: FETCH 500 in OGRPGLayerReader
2009-07-08 12:05:39 EDT ERROR: Operation on two geometries with different SRIDs
2009-07-08 12:05:39 EDT STATEMENT: FETCH 500 in OGRPGLayerReader
2009-07-08 12:05:39 EDT LOG: statement: COMMIT
More information about the gdal-dev
mailing list