It has been discussed how different versions of WFS output lat/long in different orders: https://docs.geoserver.org/latest/en/user/services/wfs/axis_order.html

This URL, for instance, in GeoJSON with this URL:




Since simply changing to WFS&version=2.0.0 in the URL doesn't change the order, what is the proper way to output a GeoJSON with a different version of WFS?

  • 4
    GeoJSON is by definition always Longitude-Latitude or Easting-Northing. See the old specification geojson.org/geojson-spec.html and the current one tools.ietf.org/html/rfc7946.
    – user30184
    Commented Sep 17, 2019 at 19:43
  • 1
    As an addendum GeoJSON is NOT EPSG:4326, it's CRS:84; they may use the same ellipsoid and datum, but precisely because they use lat/long vs long/lat axes order they are not the same CRS
    – nmtoken
    Commented Sep 18, 2019 at 20:10
  • Also note that crs: member is deprecated in GeoJSON, use CRS other than CRS:84 at your peril
    – nmtoken
    Commented Sep 18, 2019 at 20:13
  • By the way, GeoServer WFS returns classic GeoJSON (pre RFC 7946) and there is no way to ask for the newer one. That would not change the CRS or axis order though, per previous arrangement, but there are other differences. Commented Sep 19, 2019 at 10:41

1 Answer 1


In GeoServer you always the the CRS you asked for, or the protocol default otherwise (which is declared in the capabilities).

The GeoJSON specification allows for other CRSs if there is a "previous arrangement", quoting from RFC 7946:

Note: the use of alternative coordinate reference systems was specified in [GJ2008], but it has been removed from this version of the specification because the use of different coordinate reference systems -- especially in the manner specified in [GJ2008] -- has proven to have interoperability issues. In general, GeoJSON processing software is not expected to have access to coordinate reference system databases or to have network access to coordinate reference system transformation parameters. However, where all involved parties have a prior arrangement, alternative coordinate reference systems can be used without risk of data being misinterpreted.

The WFS protocol is the "previous arrangement", it leaves no space for outputs to have a CRS other than the one requested, and the client doing the request should be aware of it.

If you need to force a common GeoJSON output, you can request the output to be in "EPSG:4326" (adding "&srsName=EPSG:4326"), and then you'll get lon/lat in WGS84.

  • So if by prior arrangement I want GeoJSON in lat/long as EPSG:4326, how do you do that?
    – nmtoken
    Commented Sep 19, 2019 at 10:29
  • Simple, you don't use WFS to get it (or learn to use WFS for what it is) :-D Seriously, if you really wanted, you could force EPSG:4326 as the CRS for the layer, but using WFS 1.1 or WFS 2.0 you would still get back lat/lon order, because that's what the spec mandates. Commented Sep 19, 2019 at 10:36
  • It's a GDAL issue I think, not WFS. The simple answer is only use GeoJSON as per the specification, only CRS:84 (not EPSG:4326).
    – nmtoken
    Commented Sep 19, 2019 at 10:38
  • Also, there is another emerging possibility, use the OGC Features API (previously known as WFS3) which returns by default RFC GeoJSON in CRS:84 (currently offers no way to get it in any other CRS, an extension will be added to the base protocol to do that). Commented Sep 19, 2019 at 10:40
  • by default OGC Features API has no format, just the CRS is defaulted
    – nmtoken
    Commented Sep 19, 2019 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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