[mapserver-users] get polygons that contains a point
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Mon Sep 20 03:59:03 PDT 2010
Hi,
As Steve said, you can do it with WFS. Send the query below to http://demo.deegree.org/deegree-wfs/services with http POST and you will get back a country which contains the given point <gml:pos>3.988165755918471 47.70294862553225</gml:pos>
Unfortunately using WFS is a bit tricky and there are still too much interoperability problems with different WFS servers and clients.
<?xml version="1.0" encoding="ISO-8859-1"?>
<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:app="http://www.deegree.org/app" srsName="EPSG:4326" typeName="app:Country">
<ogc:Filter>
<ogc:Contains xmlns:gml='http://www.opengis.net/gml' >
<ogc:PropertyName xmlns:app="http://www.deegree.org/app">
app:geom</ogc:PropertyName>
<gml:Point srsName="EPSG:4326" >
<gml:pos>
3.988165755918471 47.70294862553225</gml:pos>
</gml:Point>
</ogc:Contains>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
-Jukka Rahkonen-
________________________________
Lähettäjä: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Sebastian E. Ovide
Lähetetty: 20. syyskuuta 2010 13:34
Vastaanottaja: Lime, Steve D (DNR)
Kopio: mapserver-users at lists.osgeo.org
Aihe: Re: [mapserver-users] get polygons that contains a point
yes, this works wonderfully !
just wondering if this is a MapServer only feature of if it is part of some OGC standard ....
On Thu, Sep 16, 2010 at 4:00 PM, Lime, Steve D (DNR) <Steve.Lime at state.mn.us> wrote:
In addition, the standard CGI mode=nquery will do this for you and you can craft WFS filters to do so as well.
Steve
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Josh Hevenor
Sent: Thursday, September 16, 2010 6:50 AM
To: Sebastian E. Ovide
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] get polygons that contains a point
Hi Sebastian
Take a look at the queryByPoint function found here
http://mapserver.org/mapscript/php/index.html#layerobj
Hope this helps,
Josh
On 9/16/2010 7:35 AM, Sebastian E. Ovide wrote:
Hi All
I have a OGR Layer. Is there any service that I can use to retrieve all the polygons from that layer that contain a given point ? So in the request I add the coordinates and as response I get the polygons that own that point
thanks
--
Sebastian E. Ovide
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.441 / Virus Database: 271.1.1/3136 - Release Date: 09/15/10 06:34:00
--
Sebastian E. Ovide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100920/6c4a8bf6/attachment.htm>
More information about the MapServer-users
mailing list