I cant seem to have my bbox or any other spatial filter criteria in another projection other than the native data projection (26911). I couldnt find exactly the answer in the archives so i thought i’d post
does geos support spatial filters in any projection - eg will it reproject on the server on the fly to perform calcs? if yes can somebody point me in the right direction?
Thanks - sample urls below
– URL for getFeature within BBOX of point in coords —
– WORKS
http://itis-demo.com:8080/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=itis:PLSS_RTES&filter=<ogc:Filter xmlns:ogc=“http://ogc.org” xmlns:gml=" http://www.opengis.net/gml">ogc:BBOXogc:PropertyNameGEOMETRY</ogc:PropertyName><gml:Box srsName=“EPSG:26911”>gml:coordinates569000,4445000 569020,4445020</gml:coordinates></gml:Box></ogc:BBOX></ogc:Filter>
– URL for getFeature within BBOX of point in lonlat —
– DOES NOT WORK
http://itis-demo.com:8080/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=itis:PLSS_RTES&filter=<ogc:Filter xmlns:ogc=“http://ogc.org” xmlns:gml=" http://www.opengis.net/gml">ogc:BBOXogc:PropertyNameGEOMETRY</ogc:PropertyName><gml:Box srsName=“EPSG:4326”>gml:coordinates-116.5 ,40.5 -116,40.6</gml:coordinates></gml:Box></ogc:BBOX></ogc:Filter>
Chris Hughes
Solutions Architect
Phone: (503) 616-3850 *new
Cell: (503) 807-5052
Chris Hughes ha scritto:
I cant seem to have my bbox or any other spatial filter criteria in another projection other than the native data projection (26911). I couldnt find exactly the answer in the archives so i thought i'd post
does geos support spatial filters in any projection - eg will it reproject on the server on the fly to perform calcs? if yes can somebody point me in the right direction?
I did some little investigation, and the answer is we don't support
bboxes reprojection. This traces back to Geotools, filter implementation
and bbox expression implementation does not have a clue about what a CRS
is, so they obviosly ignore it.
Adding support for it is less than trivial, because that would require
change filter parsers to build ReferencedEnvelope objects instead of plain JTS Envelopes, and then change everything that uses bbox expressions, from in memory filter executors, to all sql filter
encoders, rendereres and so on (I mean, in order to provide proper support for referenced bboxes, gt2 is big and we can't afford to
change just the part that is required to handle GetFeature requests
or it'll become a mantainance nightmare).
I've opened a jira issue against geoserver (http://jira.codehaus.org/browse/GEOS-805) and I'll open another against
geotools, but it may take months before this is addressed because of
the size of the job... if you're in a hurry, I suggest to try and provide a (big) patch, or to contract someone to do the job.
Cheers
Andrea Aime
The ability to reproject WFS is not in the 1.0 specification. It's in WFS 1.1 though, which Justin is working on on a branch. If you can work off of svn, then check out: https://svn.codehaus.org/geoserver/branches/ows4/
And see the WFS 1.1 spec on how to request in different SRS's, it's actual params of a getFeature request instead of just changing the bounds of the box.
I believe it should also handle bounding boxes in different coordinate systems and returning the data in the existing coordinates. We didn't implement it in 1.0 as the spec wasn't clear at all, though now that we have the infrastructure we may back port it to do what you want. We should have a beta release out probably in January.
best regards,
Chris
Chris Hughes wrote:
I cant seem to have my bbox or any other spatial filter criteria in another projection other than the native data projection (26911). I couldnt find exactly the answer in the archives so i thought i'd post
does geos support spatial filters in any projection - eg will it reproject on the server on the fly to perform calcs? if yes can somebody point me in the right direction?
Thanks - sample urls below
--------------------------------------------------------
-- URL for getFeature within BBOX of point in coords ---
-- *WORKS*
http://itis-demo.com:8080/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=itis:PLSS_RTES&filter=<ogc:Filter xmlns:ogc="http://ogc.org" xmlns:gml=" http://www.opengis.net/gml"><ogc:BBOX><ogc:PropertyName>GEOMETRY</ogc:PropertyName><gml:Box srsName="EPSG:26911"><gml:coordinates>569000,4445000 569020,4445020</gml:coordinates></gml:Box></ogc:BBOX></ogc:Filter>
--------------------------------------------------------
-- URL for getFeature within BBOX of point in lonlat ---
-- *DOES NOT WORK*
http://itis-demo.com:8080/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=itis:PLSS_RTES&filter=<ogc:Filter xmlns:ogc="http://ogc.org" xmlns:gml=" http://www.opengis.net/gml"><ogc:BBOX><ogc:PropertyName>GEOMETRY</ogc:PropertyName><gml:Box srsName="EPSG:4326"><gml:coordinates>-116.5 ,40.5 -116,40.6</gml:coordinates></gml:Box></ogc:BBOX></ogc:Filter>
Chris Hughes
Solutions Architect
Phone: (503) 616-3850 *new
Cell: (503) 807-5052
!DSPAM:1003,4562ab3567751665516417!
------------------------------------------------------------------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
!DSPAM:1003,4562ab3567751665516417!
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:1003,4562ab3567751665516417!
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org