Can anyone help me out as to how to convince GeoServer to consider a
distance other than degrees in my DWithin filter, I've tried
<wfs:GetFeature service="WFS" version="1.0.0"
outputFormat="GML2"
xmlns:topp="http://www.openplans.org/topp"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns="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="topp:states">
<Filter>
<DWithin>
<PropertyName>the_geom</PropertyName>
<gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coordinates>-74.817265,40.5296504</gml:coordinates>
</gml:Point>
<Distance unit="km">10</Distance>
</DWithin>
</Filter>
</wfs:Query>
</wfs:GetFeature>
and also with a full URI style UOM reference and it still thinks Ohio
is a plausible answer, which I'm pretty sure isn't.
If I get this to work I promise I'll write a tutorial page on this.
Ian
--
Ian Turton
http://www.geotools.org
http://pennspace.blogspot.com/
Hi Ian,
I am not sure geoserver or geotools really does units... The filter
interfaces support storing them, but from what i can tell they are
ignored for the most part.
Possibly what GeoServer could do is parse an incoming unit and value and
do the conversion to the units defined by the crs of the data. Or would
it be in the crs being requested? hmmm... I am sure someone more
knowledgeable can give you a better answer.
However long story short I believe you are stuck specifying distance
values in the same units as the crs for your data.
-Justin
Ian Turton wrote:
Can anyone help me out as to how to convince GeoServer to consider a
distance other than degrees in my DWithin filter, I've tried
<wfs:GetFeature service="WFS" version="1.0.0"
outputFormat="GML2"
xmlns:topp="http://www.openplans.org/topp"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns="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="topp:states">
<Filter>
<DWithin>
<PropertyName>the_geom</PropertyName>
<gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coordinates>-74.817265,40.5296504</gml:coordinates>
</gml:Point>
<Distance unit="km">10</Distance>
</DWithin>
</Filter>
</wfs:Query>
</wfs:GetFeature>
and also with a full URI style UOM reference and it still thinks Ohio
is a plausible answer, which I'm pretty sure isn't.
If I get this to work I promise I'll write a tutorial page on this.
Ian
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org
Yeah, I think it just defaults to the units of your data format. It naively just passes it back. Go ahead and file a jira for it, to at least track it. And if you can patch it that'd be great, though I'm not sure how involved it is.
Chris
Justin Deoliveira wrote:
Hi Ian,
I am not sure geoserver or geotools really does units... The filter
interfaces support storing them, but from what i can tell they are
ignored for the most part.
Possibly what GeoServer could do is parse an incoming unit and value and
do the conversion to the units defined by the crs of the data. Or would
it be in the crs being requested? hmmm... I am sure someone more
knowledgeable can give you a better answer.
However long story short I believe you are stuck specifying distance
values in the same units as the crs for your data.
-Justin
Ian Turton wrote:
Can anyone help me out as to how to convince GeoServer to consider a
distance other than degrees in my DWithin filter, I've tried
<wfs:GetFeature service="WFS" version="1.0.0"
outputFormat="GML2"
xmlns:topp="http://www.openplans.org/topp"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns="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="topp:states">
<Filter>
<DWithin>
<PropertyName>the_geom</PropertyName>
<gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coordinates>-74.817265,40.5296504</gml:coordinates>
</gml:Point>
<Distance unit="km">10</Distance>
</DWithin>
</Filter>
</wfs:Query>
</wfs:GetFeature>
and also with a full URI style UOM reference and it still thinks Ohio
is a plausible answer, which I'm pretty sure isn't.
If I get this to work I promise I'll write a tutorial page on this.
Ian
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org