Hello All,
First off I would like to say that I started using Geoserver last week
and I am thrilled with the amount of functionality I've been able to
get out of it with so little effort. Kudos to the development team.
I am trying to access all the features within a bounding box of my
data set via WFS. I have the same data set loaded in under two
different data stores, one as a shapefile and one as PostGIS. The
shapefile datastore works as expected, but the PostGIS datastore seems
to ignore the bbox.
I can access the shapefile with the following URL and I receive the
expected subset of my data:
http://yubyub.dyndns.org:8080/geoserver/wfs?version=1.0.0&bbox=-77,38.9,-76.9,39&request=GetFeature&service=WFS&typename=regional_bike
I can access the PostGIS data with the following URL, but it returns
ALL of the records:
http://yubyub.dyndns.org:8080/geoserver/wfs?version=1.0.0&bbox=-77,38.9,-76.9,39&request=GetFeature&service=WFS&typename=bike_path
I have tested PostGIS manually from psql with the following select
statement and received the exected response:
select count(gid) from bike_path where the_geom && 'BOX3D(-77.0 38.9,
-76.9 39)'::box3d;
count
-------
94
(1 row)
After scratching my head a bit I turned on the FINE debug messages in
geoserver and noticed that there is no where clause (WHERE TRUE) with
the PostGIS select statement. Out of curiousity I also tried turning
the loose bbox option on and off for the PostGIS datasource -- to no
effect.
I would appreciate any help you can give me. I have included some log
messages and version numbers below for reference.
Thanks in advance,
-jason
GeoServer 1.3.4
PostgreSQL 8.1.4
geos 2.2.1
PostGIS 1.1.4
Fedora Core 4
2990532 [INFO] org.vfny.geoserver.servlets.AbstractService - handling request:
Request: null
output format:GML2
max features:2147483647
version:1.0.0
queries:
Query
feature type: bike_path
filter: [ null intersects POLYGON ((-77 38.9, -77 39, -76.9 39,
-76.9 38.9, -77 38.9)) ]
[properties: ALL ]
2990533 [FINE] org.vfny.geoserver.servlets.AbstractService - strategy
is: org.vfny.geoserver.servlets.PartialBufferStrategy@anonymised.com
2990533 [FINER] org.vfny.geoserver.servlets.AbstractService - executing request
2990534 [FINE] org.vfny.geoserver.global.Data - getting type bike_path
2990535 [FINE] org.geotools.data.postgis.PostgisDataStore - get
Feature source called on bike_path
2990535 [FINE] org.geotools.data.postgis.PostgisDataStore - returning
pg feature locking
2990536 [FINE] org.vfny.geoserver.wfs.responses.FeatureResponse - Query is
Query
feature type: bike_path
filter: [ null intersects POLYGON ((-77 38.9, -77 39, -76.9 39,
-76.9 38.9, -77 38.9)) ]
[properties: ALL ]
To gt2: Query:
feature type: bike_path
filter: [ null intersects POLYGON ((-77 38.9, -77 39, -76.9 39,
-76.9 38.9, -77 38.9)) ]
[properties: ALL ]
2990537 [FINE] org.geotools.data.postgis.PostgisDataStore - get
Feature source called on bike_path
2990537 [FINE] org.geotools.data.postgis.PostgisDataStore - returning
pg feature locking
2990537 [FINER] org.vfny.geoserver.servlets.AbstractService - execution succeed
2990541 [FINER] org.vfny.geoserver.servlets.AbstractService - strategy
output is: org.vfny.geoserver.util.PartialBufferedOutputStream
2990542 [FINE] org.vfny.geoserver.servlets.AbstractService - mime type
is: text/xml; charset=UTF-8
2990545 [FINE] org.geotools.data.jdbc.JDBC1DataStore - calling sql
builder with filter Filter.NONE
2990545 [FINER] AbstractFilter - ENTRY 12,345
2990546 [FINE] org.geotools.data.jdbc.JDBC1DataStore - sql is SELECT
"gid", "length", "from_st", "to_st", "name", "signed", "length_mi",
"juris", "type", encode(AsBinary(force_2d("the_geom"),
'XDR'),'base64') FROM "public"."bike_path" WHERE TRUE
2990546 [FINE] org.geotools.data.jdbc.JDBC1DataStore - About to
execute query: SELECT "gid", "length", "from_st", "to_st", "name",
"signed", "length_mi", "juris", "type",
encode(AsBinary(force_2d("the_geom"), 'XDR'),'base64') FROM
"public"."bike_path" WHERE TRUE
2990546 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting
available connection.
2991078 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager
- Connection closed - adding to available connections.
2991079 [FINE] org.geotools.data.jdbc.JDBC1DataStore - calling sql
builder with filter Filter.NONE
2991080 [FINER] AbstractFilter - ENTRY 12,345
2991080 [FINE] org.geotools.data.jdbc.JDBC1DataStore - sql is SELECT
"gid", "length", "from_st", "to_st", "name", "signed", "length_mi",
"juris", "type", encode(AsBinary(force_2d("the_geom"),
'XDR'),'base64') FROM "public"."bike_path" WHERE TRUE
2991107 [FINE] org.geotools.data.jdbc.JDBC1DataStore - About to
execute query: SELECT "gid", "length", "from_st", "to_st", "name",
"signed", "length_mi", "juris", "type",
encode(AsBinary(force_2d("the_geom"), 'XDR'),'base64') FROM
"public"."bike_path" WHERE TRUE
2991108 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting
available connection.