Gaby,

in theory, the WFS GetCapabilities response lists all supported CRSs for each feature type, but in practice, because this would add 5000+ otherSRS/otherCRS elements for each feature type (enumerating the contents of the EPSG database), these elements are not encoded. They can be configured by the server administrator:
http://docs.geoserver.org/latest/en/user/services/wfs/webadmin.html#configuring-additional-srs

In practice, probe by trying a request with a particular CRS and detecting failure. A CRS in a recent EPSG database will be supported by recent GeoServer, for similar values of recent.

Use SRSNAME to request that response geometries be reprojected to a particular CRS. Use a five-parameter BBOX to specify your BBOX in a CRS other than the default for the feature type. These two CRS do not have to be the same. They are orthogonal considerations.

For example, using the demo bug sites layer (sf:archsites):

Give me archsites.2 by BBOX (the default CRS is EPSG:26713):
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=sf:archsites&bbox=591949.5,4922999.5,591950.5,4923000.5

Give me archsites.2 reprojected into WGS 84 with SRSNAME (note that the BBOX is still in EPSG:26713):
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=sf:archsites&bbox=591949.5,4922999.5,591950.5,4923000.5&srsname=http://www.opengis.net/def/crs/EPSG/0/4326

Using WGS 84 BBOX coordinates fails because the BBOX defaults to EPSG:26713 (this returns no features):
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=sf:archsites&bbox=44.4562825,-103.8446375,44.4562835,-103.8446365&srsname=http://www.opengis.net/def/crs/EPSG/0/4326

But we can select archsites.2 if we use a five parameter BBOX with WGS 84 coordinates *and* specify that it is in WGS 84:
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=sf:archsites&bbox=44.4562825,-103.8446375,44.4562835,-103.8446365,http://www.opengis.net/def/crs/EPSG/0/4326&srsname=http://www.opengis.net/def/crs/EPSG/0/4326

We can leave off the SRSNAME if we want to request in WGS 84 but still want the response geometries in its native EPSG:26713:
http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=sf:archsites&bbox=44.4562825,-103.8446375,44.4562835,-103.8446365,http://www.opengis.net/def/crs/EPSG/0/4326

Kind regards,
Ben.


On 10/01/18 12:16, Gabriella Turek wrote:
I’ve gotten my client to interrogate a WFS service (thank you Ian!).
Now I have a question about how to handle CRSs.
With WFS, I can ask the service what CRS are supported and ask the service for 
maps in a specific CRS.
Is there something similar for WFS, or do I have to reproject on the client 
side (as needed).
If the latter, that means that if I am making a query filter that include a 
bbox, the bbox must be in the CRS of the service, correct?
Thanx
Gaby


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


--
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to