[Geoserver-users] WFS Filter with Function "buffer"?

Hi list,

I'd like to use a WFS filter to find geometries that are within a buffer
around a line (or any geometry).

Unfortunately I can't find an example of this. Trying to get the buffer
working on the default WFS_getFeatureIntersects.xml demo [1] results in
a null-pointer exception[2].

Does anybody have a working buffer example? If so, this might be a nice
addition to the filter examples in the wiki [3].

Regards,

Roald

[1] http://pastebin.com/me7b8023
[2] http://pastebin.com/m5bf25913
[3] http://geoserver.org/display/GEOSDOC/Filter+Function+tutorial+%
28unfinished%29

Roald de Wit <rdewit <at> users.sourceforge.net> writes:

Hi list,

I'd like to use a WFS filter to find geometries that are within a buffer
around a line (or any geometry).

Unfortunately I can't find an example of this. Trying to get the buffer
working on the default WFS_getFeatureIntersects.xml demo [1] results in
a null-pointer exception[2].

Does anybody have a working buffer example? If so, this might be a nice
addition to the filter examples in the wiki [3].

Perhaps DWithin? OpenJUMP created a request like this when I asked it to get me
features within a distance of 100 meters fron a selected polygon:

<ogc:Filter>
<ogc:DWithin xmlns:gml='http://www.opengis.net/gml’ >
<ogc:PropertyName xmlns:app="http://www.deegree.org/app&quot;&gt;
app:geometry</ogc:PropertyName>
<gml:Polygon srsName="EPSG:26912">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates cs="," decimal="." ts=" ">
484833.0,7221978.0 489832.0,7221978.0 489832.0,7216979.0 484833.0,7216979.0
484833.0,7221978.0</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
<ogc:Distance units="m">
100.0</ogc:Distance>
</ogc:DWithin>
</ogc:Filter>

-Jukka Rahkonen-

Hi Jukka,

On Wed, 2008-03-26 at 06:17 +0000, Jukka Rahkonen wrote:

Perhaps DWithin? OpenJUMP created a request like this when I asked it to get me
features within a distance of 100 meters fron a selected polygon:

DWithin will be part of it, but my challenge is to create a buffer
around a line to turn it into a polygon that I can do a DWithin on. :frowning:

Regards, Roald

Oops, I was too quick with my reply. This might work Jukka!

Thanks and I'll let you know the outcome.

Roald

Roald de Wit <rdewit <at> users.sourceforge.net> writes:

Hi Jukka,

DWithin will be part of it, but my challenge is to create a buffer
around a line to turn it into a polygon that I can do a DWithin on.

I don't know about the theory, but the following seems to work as well:

<ogc:Filter>
<ogc:DWithin xmlns:gml='http://www.opengis.net/gml’ >
<ogc:PropertyName xmlns:app="http://www.deegree.org/app&quot;&gt;
app:geometry</ogc:PropertyName>
<gml:LineString srsName="EPSG:26912">
<gml:coordinates cs="," decimal="." ts=" ">
438498.9009484868,7171823.241845653
485612.13779526355,7239259.835763589</gml:coordinates>
</gml:LineString>
<ogc:Distance units="m">
100.0</ogc:Distance>
</ogc:DWithin>
</ogc:Filter>

-Jukka-

Hi Roald,

I have verified that this is a bug with our filter parsing, and have created an issue report for it.

http://jira.codehaus.org/browse/GEOS-1829

I have also attached a patch to the issue. As soon as another developer can review (most likely in a few hours when someone from Europe gets up) , we can commit it (if there are no problems with it of course). You should be able to grab it in a nightly build tomorrow.

-Justin

Roald de Wit wrote:

Hi Jukka,

On Wed, 2008-03-26 at 06:17 +0000, Jukka Rahkonen wrote:

Perhaps DWithin? OpenJUMP created a request like this when I asked it to get me
features within a distance of 100 meters fron a selected polygon:

DWithin will be part of it, but my challenge is to create a buffer
around a line to turn it into a polygon that I can do a DWithin on. :frowning:

Regards, Roald

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,47e9ec6c301471637810514!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com