[TinyOWS-users] Trouble with a spatial fiter
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Fri May 20 03:12:42 EST 2011
Hi,
I have managed to do very successful queries with attribute filters and
now I would like to continue into spatial filters. First trial lead to
an error and I fear I need a bit help for finding out what goes wrong
with my filter.
Here are two entries from the TinyOWS log. This one is from a successful
GetFeature without filters
[QUERY]
<wfs:GetFeature xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0"
maxFeatures="1000" outputFormat="text/xml; subtype=gml/3.1.1"><wfs:Query
xmlns:lv="http://latuviitta.fi/" srsName="urn:ogc:def:crs:EPSG::3067"
typeName="lv:mml_namep"><wfs:PropertyName>lv:asulkm1999</wfs:PropertyNam
e><wfs:PropertyName>lv:igds_level</wfs:PropertyName><wfs:PropertyName>lv
:igds_text</wfs:PropertyName><wfs:PropertyName>lv:kieli</wfs:PropertyNam
e><wfs:PropertyName>lv:kulma</wfs:PropertyName><wfs:PropertyName>lv:taaj
aid</wfs:PropertyName><wfs:PropertyName>lv:text1</wfs:PropertyName><wfs:
PropertyName>lv:text2</wfs:PropertyName><wfs:PropertyName>lv:text3</wfs:
PropertyName><wfs:PropertyName>lv:the_geom</wfs:PropertyName></wfs:Query
></wfs:GetFeature>
This one is a log entry from the the same base query but this time with
an added Intersects filter
[QUERY]
<wfs:GetFeature xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0"
maxFeatures="1000" outputFormat="text/xml; subtype=gml/3.1.1"><wfs:Query
xmlns:lv="http://latuviitta.fi/" srsName="urn:ogc:def:crs:EPSG::3067"
typeName="lv:mml_namep"><wfs:PropertyName>lv:asulkm1999</wfs:PropertyNam
e><wfs:PropertyName>lv:igds_level</wfs:PropertyName><wfs:PropertyName>lv
:igds_text</wfs:PropertyName><wfs:PropertyName>lv:kieli</wfs:PropertyNam
e><wfs:PropertyName>lv:kulma</wfs:PropertyName><wfs:PropertyName>lv:taaj
aid</wfs:PropertyName><wfs:PropertyName>lv:text1</wfs:PropertyName><wfs:
PropertyName>lv:text2</wfs:PropertyName><wfs:PropertyName>lv:text3</wfs:
PropertyName><wfs:PropertyName>lv:the_geom</wfs:PropertyName><ogc:Filter
><ogc:Intersects><ogc:PropertyName>lv:the_geom</ogc:PropertyName><gml:Su
rface>
<gml:patches>
<gml:Polygon>
<gml:exterior><gml:LinearRing><gml:posList>369599.4780422082
6919973.386401318 369599.4780422082 6980714.097399444 448217.05381570297
6980714.097399444 448217.05381570297 6919973.386401318 369599.4780422082
6919973.386401318</gml:posList></gml:LinearRing></gml:exterior></gml:Pol
ygon>
</gml:patches>
</gml:Surface></ogc:Intersects></ogc:Filter></wfs:Query></wfs:GetFeature
>
The latter request leads to TinyOWS error message:
<?xml version='1.0' encoding='UTF-8'?>
<ows:ExceptionReport
xmlns='http://www.opengis.net/ows'
xmlns:ows='http://www.opengis.net/ows'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://www.opengis.net/ows
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd'
version='1.1.0' language='en'>
<ows:Exception exceptionCode='InvalidParameterValue' locator='request'>
<ows:ExceptionText>XML request isn't valid</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
The spatial filter is generated by a deegree based client and I do not
suppose it is totally wrong. At least that filter is working with
Geoserver 2.1.
Here is the filter in easy-to-read format
<ogc:Filter><ogc:Intersects>
<ogc:PropertyName>lv:the_geom</ogc:PropertyName>
<gml:Surface>
<gml:patches>
<gml:Polygon>
<gml:exterior>
<gml:LinearRing>
<gml:posList>369599.4780422082 6919973.386401318 369599.4780422082
6980714.097399444 448217.05381570297 6980714.097399444
448217.05381570297 6919973.386401318 369599.4780422082 6919973.386401318
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:patches>
</gml:Surface>
</ogc:Intersects>
</ogc:Filter>
-Jukka Rahkonen-
More information about the TinyOWS-users
mailing list