Hi all,
Thanks to Andrea and others, I have managed to get my non-native GetFeature
call working.
Almost!
In my application, I'm using OpenLayers to composite a Google baselayer with an
overlay of my own construction, served up with GeoServer 2.3. The layers in my
thing are all in a Wisconsin-specific projection (EPSG:3071), and they line up
nicely with the Google layer when I put it together with OpenLayers. So, as far
as I know, I've got those data in there correctly.
What I'm trying to do is get data via GetFeature calls from lat/long
coordinates, e.g. from a cell phone. So (pardon the long URL) a call that
ALMOST works looks like this:
http://144.92.93.196/geoserver/wfs?service=wfs
&REQUEST=GetFeature
&typename=mmas:rf_map_0
&maxFeatures=2
&BBOX=-89.4,43.1,-89.4,43.1,EPSG:4326
&srsname=EPSG:4326
The trouble is, of course, that BBOX won't do -- it returns multiple features,
any of whose bboxes overlap the given one (in this case, basically a point).
So what I need to do is use a spatial operator, and CQL seems perfect for the
job. I've tried various stabs at using CONTAINS in the URL. I've figured out
the syntax but have one more problem.
Here's a query that works using CQL:
http://144.92.93.196/geoserver/wfs?service=wfs
&REQUEST=GetFeature
&typeNAME=mmas:rf_map_0
&maxFeatures=1
&srsNAME=EPSG:4326
&cql_filter=contains(the_geom,poin(579554 274543))
But the phone delivers EPSG:4326 coordinates. Can this be done à la the BBOX
request above? Can GeoServer transform the SRS in a CQL query, or must I tell
my poor mobile-app author that he has to find a Proj equivalent for his
application platform and transform to EPSG:3071 before sending the query?
Because I think I'll get a very snippy email indeed if I recommend that course
to him!
Thanks (yet again) for your help,
rw
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users