3

WMS and WFS queries needs SRS and BBOX parameters.

http://example.com/geoserver/wfs?
  service=WFS&
  version=2.0.0&
  request=GetFeature&
  typeNames=namespace:featuretype&
  srsName=CRS&
  bbox=a1,b1,a2,b2&

For example I have GeoServer to publish WFS. My data SRS is EPSG:4326 and my map SRS is EPSG:3857. So I send a WFS query.

http://example.com/geoserver/wfs?
  service=WFS&
  version=2.0.0&
  request=GetFeature&
  typeNames=namespace:featuretype&
  srsName=EPSG:3857&
  bbox=978393.9621,2680799.4560,-430493.3433,3326539.4710&

Does GeoServer or ArcGIS server give an error? Because my data has EPSG:4326 . Or does GeoServer convert these coordinates internally and find data and send me as EPSG:3857

1
  • Your title suggests your question is about WMS and WFS but your examples are both WFS. You then talk about ArcGIS and GeoServer, but your examples are both about GeoServer.
    – nmtoken
    Jan 24, 2017 at 20:25

1 Answer 1

9

WMS and WFS have different behavior.

In WMS the SRS and BBOX parameters are mandatory and the SRS defines both the output projection, and the BBOX has to be expressed in the SRS coordinates.

In WFS instead they are both optional, and not linked to each other. srsName defines the desired output projection, so it will cause reprojection, while the BBOX is, for compatibility reasons, best expressed using the 5 parameters approach, stating clearly the CRS of the bbox.

So a fully complaint request for a demo layer in EPSG:4326, to be reprojected in 3857, would be:

http://demo.geo-solutions.it/geoserver/tiger/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=tiger:tiger_roads&srsName=EPSG:3857&bbox=40.7,-74,40.8,-73,urn:ogc:def:crs:EPSG:4326&maxFeatures=1

(note how the bbox is expressed in lat/lon too, in order to be fully compliant with WFS 1.1 specification expected axis order)

Not the answer you're looking for? Browse other questions tagged or ask your own question.