Hi,
Using GeoServer 1.3.1 war in Tomcat 5.5.12 and PostGIS
I’m having trouble while attempting to Post a GetFeature filter for a WFS datastore with a custom SRS.
I’ve added the new coord system to the epsg.properties file in gt2-epsg.jar:
104308=PROJCS[“NAD83 / UTM zone 11N”,GEOGCS[“NAD83”,DATUM[“North_American_Datum_1983”,SPHEROID[“GRS 1980”,6378137,298.257222101,AUTHORITY[“EPSG”,“7019”]],TOWGS84[0,0,0],AUTHORITY[“EPSG”,“6269”]],PRIMEM[“Greenwich”,0,AUTHORITY[“EPSG”,“8901”]],UNIT[“degree”,0.01745329251994328,AUTHORITY[“EPSG”,“9122”]],AUTHORITY[“EPSG”,“4269”]],PROJECTION[“Transverse_Mercator”],PARAMETER[“latitude_of_origin”,0],PARAMETER[“central_meridian”,-117],PARAMETER[“scale_factor”,0.9996],PARAMETER[“false_easting”,-219278.5],PARAMETER[“false_northing”,-3608990.1],UNIT[“metre”,1,AUTHORITY[“EPSG”,“9001”]],AUTHORITY[“geotechYuma”,“104308”]]
I also added it to my PostGIS spatial_ref_sys table. The custom transform checks out correctly in PostGIS:
select asewkt(the_geom) from grid where the_geom && transform(GeometryFromText(‘LINESTRING(-114.58944702148402 32.764865874385, -113.64826965331999 33.551517485702824)’,4269),104308)
However, when using a WFS Filter query like the following I get an empty set returned?
<?xml version='1.0' encoding='UTF-16' standalone='yes'?><wfs:GetFeature service=“WFS” version=“1.0.0”
outputFormat=“GML2”
xmlns:wfs=“http://www.opengis.net/wfs”
xmlns:ogc=“http://www.opengis.net/ogc”
xmlns:gml=“http://www.opengis.net/gml”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
<wfs:Query typeName=“geo:grid”>
ogc:PropertyNamegeo:name</ogc:PropertyName>
ogc:PropertyNamegeo:the_geom</ogc:PropertyName>
ogc:PropertyNamethe_geom</ogc:PropertyName>
<gml:Box srsName=“http://www.opengis.net/gml/srs/epsg.xml#4326”>
gml:coordinates-114.58944702148402,32.764865874385 -113.64826965331999,33.551517485702824</gml:coordinates>
</gml:Box>
</ogc:BBOX>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
Here is the log filter:
Request: null
output format:GML2
max features:2147483647
version:
queries:
Query
feature type: geo:grid
filter: [ the_geom bbox POLYGON ((-114.58944702148402 32.764865874385, -114.58944702148402 33.551517485702824, -113.64826965331999 33.551517485702824, -113.64826965331999 32.764865874385, -114.58944702148402 32.764865874385)) ]
[properties: name, the_geom]
I think GeoServer is not detecting the custom SRS in the datastore and transforming the bbox to SRID=104308. Though perhaps I am not understanding the proper syntax for a gml:Box element. Is there a transform that should be applied in the OGC filter Box element?
Or do I have to perform the transform myself outside of the filter?
Curiously I can see the data in a WMS query using this kind of BBOX so WMS must be picking up the transform:
gml:X-114.58944702148402</gml:X>
gml:Y32.764865874385</gml:Y>
</gml:coord>
gml:X-113.64826965331998</gml:X>
gml:Y33.551517485702824</gml:Y>
</gml:coord>
I can also see the data using a WFS filter query like this with the custom SRS coordinates:
<?xml version='1.0' encoding='UTF-16' standalone='yes'?><wfs:GetFeature service=“WFS” version=“1.0.0”
outputFormat=“GML2”
xmlns:wfs=“http://www.opengis.net/wfs”
xmlns:ogc=“http://www.opengis.net/ogc”
xmlns:gml=“http://www.opengis.net/gml”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
<wfs:Query typeName=“geo:grid”>
ogc:PropertyNamegeo:name</ogc:PropertyName>
ogc:PropertyNamegeo:the_geom</ogc:PropertyName>
ogc:PropertyNamethe_geom</ogc:PropertyName>
<gml:Box srsName=“http://www.opengis.net/gml/srs/epsg.xml#104308”>
gml:coordinates29000,26000 93000,45000</gml:coordinates>
</gml:Box>
</ogc:BBOX>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
Thanks
Randy George