[Users] How to use OGC filters with Geoext
Surendran Neelakantan
surendrankn at gmail.com
Tue Sep 6 22:13:20 CEST 2011
Hi
Here is the code I have tried, but I dont know what is the value for the
"featureNS" parameter for the above remote query.
Here is the proxy part of the store
OpenLayers.ProxyHost="/
geoserver/rest/proxy?url=";
proxy: new GeoExt.data.ProtocolProxy({
protocol: new OpenLayers.Protocol.WFS({
url: "http://SDMDataAccess.nrcs.usda.gov/Spatial/SDMNAD83UTM.wfs<http://sdmdataaccess.nrcs.usda.gov/Spatial/SDMNAD83UTM.wfs>
",
version: "1.1.0",
featureType: "MapunitPoly",
featureNS: "",
srsName: "EPSG:4326",
extractAttributes: true
})
})
This is working with my local geoserver where i know the value of
"featureNS".
I am able to retrieve data successfully with "OpenLayers.loadURL( url
,"","",responsedata)
where url is the full WFS query with filters. Then I could parse the
response data with
OpenLayers.Format.GML.read(response.responseXML)
But here I have no idea how to connect the responsedata to the store ?
Is it possible to pass the whole querey as string in the url part of the
ProtocolProxy ? If it is possible I can apply the filters in the
server-side which may improve the performance.
It would be great if you could help me to figure out this.
Thank you
On Fri, Aug 5, 2011 at 12:45 PM, Matt Priour <mpriour at kestrelcomputer.com>wrote:
> Use a ProtocolProxy with a WFS protocol and configure OpenLayers with a
> ProxyHost
> Matt Priour
> Kestrel Computer Consulting
>
> [1] GeoExt ProtocolProxy -
> http://dev.geoext.org/docs/lib/GeoExt/data/ProtocolProxy.html
> [2] OpenLayers WFS Protocol -
> http://dev.openlayers.org/docs/files/OpenLayers/Protocol/WFS/v1-js.html
> [3] OpenLayers ProxyHost -
> http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost
>
> *From:* Surendran Neelakantan <surendrankn at gmail.com>
> *Sent:* Friday, August 05, 2011 10:41 AM
> *To:* users at geoext.org
> *Subject:* [Users] How to use OGC filters with Geoext
>
>
> Hi
>
> I would like to know the best way to use OGC WFS filters with GeoEXT. I
> want to query a WFS server and get the response data in GML format in a
> grid. a sample query look like following.
>
> http://SDMDataAccess.nrcs.usda.gov/Spatial/SDMNAD83UTM.wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature
> &TYPENAME=MapunitPoly&FILTER=<Filter><BBOX><PropertyName>Geometry</PropertyName>
> <Box srsName='EPSG:4236'><coordinates>-121.77100,37.368402
> -121.76000,37.373473</coordinates>
> </Box></BBOX></Filter>&SRSNAME=EPSG:26910&OUTPUTFORMAT=GML2
> <http://sdmdataaccess.nrcs.usda.gov/Spatial/SDMNAD83UTM.wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=MapunitPoly&FILTER=%3CFilter%3E%3CBBOX%3E%3CPropertyName%3EGeometry%3C/PropertyName%3E%3CBox%20srsName=%27EPSG:4236%27%3E%3Ccoordinates%3E-121.77100,37.368402%20-121.76000,37.373473%3C/coordinates%3E%3C/Box%3E%3C/BBOX%3E%3C/Filter%3E&SRSNAME=EPSG:26910&OUTPUTFORMAT=GML2>
>
>
> How do I overcome the same origin policy when creating a data store with
> the above query.?
>
> It would be great if somebody can show me a working example with the above
> query.
>
> Thank you
>
>
>
>
> ------------------------------
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110906/13749e2f/attachment-0001.htm
More information about the Users
mailing list