axis_order.rst 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685
  1. .. _wfs_basics_axis:
  2. Axis ordering
  3. =============
  4. The definition of a spatial reference system includes an indication of the axis order used to interpret the coordinates. There are a number of projected spatial reference systems defined in `north/east` order in the formal ``EPSG`` definition, but are interpreted as being in ``east/north`` order by earlier versions of the ``WFS`` protocol.
  5. * ``WFS 1.0.0``: Provides geographic coordinates in ``east/north`` and may not be trusted to respect the EPSG definition axis order.
  6. * ``WFS 1.1.0``: Respects the axis order defined by the EPSG definition.
  7. * ``WFS 2.0.0``: Respects the axis order defined by the EPSG definition.
  8. Forcing content into ``east/north`` order was intended to be easier for developers where computer displays are defined with an `x/y` order. However this decision has introduced no end of confusion, and was corrected in later versions of ``WFS``.
  9. .. note:: Some spatial reference systems, for example polar stereographic, do not have an ``east`` or ``west`` as they have a pole in the middle of the axis.
  10. These differences may cause difficulties when clients switch between different ``WFS`` versions. To minimize confusion and increase interoperability, GeoServer has adopted the following guidelines when specifying spatial reference systems to avoid ambiguity.
  11. .. list-table::
  12. :widths: 50 25 25
  13. :header-rows: 1
  14. * - Representation
  15. - Axis order
  16. - Interpretation
  17. * - ``EPSG:4326``
  18. - longitude/latitude
  19. - assumption
  20. * - ``http://www.opengis.net/gml/srs/epsg.xml#xxxx``
  21. - longitude/latitude
  22. - strict
  23. * - ``urn:x-ogc:def:crs:EPSG:xxxx``
  24. - latitude/longitude
  25. - strict
  26. * - ``urn:ogc:def:crs:EPSG::4326``
  27. - latitude/longitude
  28. - strict
  29. SRSList Axis Order
  30. ------------------
  31. To compare the spatial reference system definition for ``EPSG:4326``:
  32. #. Navigate :menuselection:`Demos --> SRS List` page and search for :kbd:`4326`.
  33. #. Compare the formal `EPSG` definition of `WGS84`:
  34. .. figure:: img/wgs84-epsg-description.png
  35. WGS84 EPSG definition
  36. #. With the internal definition of `WGS84`:
  37. .. figure:: img/wgs84-internal-description.png
  38. WGS84 Internal definition
  39. The same approach can be used to check the definition of any spatial reference system supported by GeoServer.
  40. .. note:: The formal ``EPSG`` definition provides the axis-order used to interpret coordinate values. GeoServer uses an internal representation that does not always respect the ``EPSG`` provided axis order.
  41. In the example above ``EPSG:4326`` is defined with a `north/east` axis order, while the internal representation has ``east/north`` order.
  42. The startup option ``-Dorg.geotools.referencing.forceXY=true`` is used to configure GeoServer to prefer an internal representation in `east/north` axis order. We recommend the default value of ``true`` to match a wide range of clients that make this assumption.
  43. Layer Axis Order
  44. ----------------
  45. The default data directory includes the following dataset illustrating this challenge:
  46. * :file:`shapefile/states.shp``: Data stored in x/y order::
  47. MULTIPOLYGON (((-121.664154 38.169369,-121.781296 38.066856, ...
  48. * :file:`shapefiles/states.prj` ::
  49. GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
  50. Published as ``topp:states`` with Spatial Reference System ``EPSG:4326``.
  51. To review how this layer has been published:
  52. #. Navigate to the :guilabel:`Edit Layer` page for ``topp:states``.
  53. #. Locate :guilabel:`Native SRS` and click on the :guilabel:`GCS_WGS_1984` link to show how GeoServer interpreted the :file:`PRJ` file above.
  54. The :file:`PRJ` did not provide an axis-order and GeoSever has filled in an assumption. This describing the data in `x/y` order which matches our data and we could use it unmodified.
  55. .. figure:: img/native_srs.png
  56. Native SRS for topp:states
  57. #. Locate :guilabel:`Declared SRS` and click on :guilabel:`EPSG:WGS 84...` link to see the definition used to publish this content.
  58. This is the internal definition of ``EPSG:4326`` as shown in the SRSList above, which also describes the data in `x/y` order matching our data. This definition provides slightly more readable names along with additional ``AUTHORITY`` information that may be helpful to client applications.
  59. .. figure:: img/declared_srs.png
  60. Declared SRS for topp:states
  61. #. The :guilabel:`SRS Handling` is set to ``Force declared`` to completely ignore the provided :guilabel:`Native SRS` definition and use the :guilabel:`Declared SRS`.
  62. .. figure:: img/srs_handling.png
  63. Force declared SRS handling for topp:states
  64. WFS 1.0 Axis Order
  65. ------------------
  66. **GetCapabilities** describes ``topp:states`` using:
  67. http://localhost:8080/geoserver/ows?service=wfs&version=1.0.0&request=GetCapabilities
  68. .. code-block:: xml
  69. <FeatureType><Name>topp:states</Name>
  70. <Title>USA Population</Title>
  71. <Abstract>This is some census data on the states.</Abstract>
  72. <Keywords>census, united, boundaries, state, states</Keywords>
  73. <SRS>EPSG:4326</SRS>
  74. <LatLongBoundingBox minx="-124.731422" miny="24.955967" maxx="-66.969849" maxy="49.371735" />
  75. </FeatureType>
  76. WFS 1.0 describes the latitude / longitude bounds with the understanding that you will associate `minx` and `maxx` with longitude, and also `miny` and `maxy` with latitude.
  77. WFS 1.0 *GetFeature* request defaults to GML2 output, and the default ``EPSG:4326`` spatial reference system used to publish the layer:
  78. * WFS 1.0 Default: http://localhost:8080/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1
  79. The GML2 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, with data in x/y order:
  80. .. code-block:: xml
  81. <gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  82. <gml:polygonMember>
  83. <gml:Polygon>
  84. <gml:outerBoundaryIs><gml:LinearRing>
  85. <gml:coordinates decimal="." cs="," ts=" ">
  86. -88.071564,37.51099 -88.087883,37.476273
  87. WFS 1.0 output format GML3
  88. ``````````````````````````
  89. * GML3.1 (default ``EPSG:4326``):
  90. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml3
  91. GML3 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, with data in x/y order:
  92. .. code-block:: xml
  93. <gml:MultiSurface srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  94. <gml:surfaceMember>
  95. <gml:Polygon>
  96. <gml:exterior>
  97. <gml:LinearRing>
  98. <gml:posList>
  99. -88.071564 37.51099 -88.087883 37.476273
  100. * GML3.1 reproject to ``EPSG:4326``
  101. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml3&srsName=urn:x-ogc:def:crs:EPSG:4326
  102. GML3 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, with data in x/y order:
  103. .. code-block:: xml
  104. <gml:MultiSurface srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  105. <gml:surfaceMember>
  106. <gml:Polygon>
  107. <gml:exterior>
  108. <gml:LinearRing>
  109. <gml:posList>
  110. -88.071564 37.51099 -88.087883
  111. * GML 3.1 reproject to ``urn:x-ogc:def:crs:EPSG:4326``
  112. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml3&srsName=urn:x-ogc:def:crs:EPSG:4326
  113. GML3.1 output using ``urn:x-ogc:def:crs:EPSG:4326`` reference and data in y/x order:
  114. .. code-block:: xml
  115. <gml:MultiSurface srsName="urn:x-ogc:def:crs:EPSG:4326">
  116. <gml:surfaceMember>
  117. <gml:Polygon>
  118. <gml:exterior>
  119. <gml:LinearRing>
  120. <gml:posList>
  121. 37.51099 -88.071564 37.476273 -88.087883
  122. WFS 1.0 output format GML32
  123. ```````````````````````````````
  124. * GML3.2:
  125. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml32
  126. The GML32 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, with data in x/y order:
  127. .. code-block:: xml
  128. <gml:MultiSurface srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" gml:id="states.1.the_geom">
  129. <gml:surfaceMember>
  130. <gml:Polygon gml:id="states.1.the_geom.1">
  131. <gml:exterior>
  132. <gml:LinearRing>
  133. <gml:posList>-88.071564 37.51099 -88.087883 37.476273
  134. * GML3.2 reproject to ``EPSG:4326``:
  135. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml32&srsName=EPSG:4326
  136. The GML32 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, with data in x/y order:
  137. .. code-block:: xml
  138. <gml:MultiSurface srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" gml:id="states.1.the_geom">
  139. <gml:surfaceMember>
  140. <gml:Polygon gml:id="states.1.the_geom.1">
  141. <gml:exterior>
  142. <gml:LinearRing>
  143. <gml:posList>
  144. -88.071564 37.51099 -88.087883 37.476273
  145. * GML3.2 reproject to ``urn:x-ogc:def:crs:EPSG:4326``:
  146. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml32&srsName=urn:x-ogc:def:crs:EPSG:4326
  147. GML3.2 output using ``urn:x-ogc:def:crs:EPSG:4326`` reference and data in y/x order:
  148. .. code-block:: xml
  149. <gml:MultiSurface srsName="urn:ogc:def:crs:EPSG::4326" gml:id="states.1.the_geom">
  150. <gml:surfaceMember>
  151. <gml:Polygon gml:id="states.1.the_geom.1">
  152. <gml:exterior>
  153. <gml:LinearRing><gml:posList>
  154. 37.51099 -88.071564 37.476273 -88.087883
  155. WFS 1.1 Axis Order
  156. ------------------
  157. **GetCapabilities** describes ``topp:states`` using:
  158. http://localhost:8080/geoserver/ows?service=wfs&version=1.1.0&request=GetCapabilities
  159. .. code-block:: xml
  160. <FeatureType>
  161. <Name>topp:states</Name>
  162. <Title>USA Population</Title>
  163. <Abstract>This is some census data on the states.</Abstract>
  164. <ows:Keywords>
  165. <ows:Keyword>census</ows:Keyword><ows:Keyword>united</ows:Keyword><ows:Keyword>boundaries</ows:Keyword><ows:Keyword>state</ows:Keyword><ows:Keyword>states</ows:Keyword>
  166. </ows:Keywords>
  167. <DefaultSRS>urn:x-ogc:def:crs:EPSG:4326</DefaultSRS>
  168. <ows:WGS84BoundingBox>
  169. <ows:LowerCorner>-124.731422 24.955967</ows:LowerCorner>
  170. <ows:UpperCorner>-66.969849 49.371735</ows:UpperCorner>
  171. </ows:WGS84BoundingBox></FeatureType>
  172. WFS 1.1 describes the ``WGS84BoundingBox`` as a lower and upper corner in x/y order.
  173. .. warning:: This combination is inconsistent with ``DefaultSRS`` definition and the ``LowerCorner`` and ``UpperCorner`` coordinate order and may confuse client applications.
  174. The result matches the WFS 1.1.0 Implementation Specification GetCapabilities examples.
  175. WFS 1.1 *GetFeature* request defaults to GML3 output, and the default ``urn:x-ogc:def:crs:EPSG:4326`` spatial reference system used to publish the layer:
  176. * WFS 1.1 Default:
  177. http://localhost:8080/geoserver/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1
  178. The GML3.1 output uses ``urn:x-ogc:def:crs:EPSG:4326`` reference, with data in y/x order:
  179. .. code-block:: xml
  180. <gml:MultiSurface srsName="urn:x-ogc:def:crs:EPSG:4326">
  181. <gml:surfaceMember>
  182. <gml:Polygon>
  183. <gml:exterior>
  184. <gml:LinearRing>
  185. <gml:posList>
  186. 37.51099 -88.071564 37.476273 -88.087883
  187. * WFS 1.1 reproject to ``EPSG:4326``:
  188. http://localhost:8080/geoserver/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&srsName=EPSG:4326
  189. The GML3.1 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, with data in x/y order:
  190. .. code-block:: xml
  191. <gml:MultiSurface srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  192. <gml:surfaceMember>
  193. <gml:Polygon>
  194. <gml:exterior>
  195. <gml:LinearRing>
  196. <gml:posList>
  197. -88.071564 37.51099 -88.087883 37.476273
  198. .. note:: The `srsName` and `posList` coordinate order are consistent.
  199. This approach can be used to force x/y order.
  200. * WFS 1.1 reproject to ``urn:x-ogc:def:crs:EPSG:4326``:
  201. http://localhost:8080/geoserver/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&srsName=urn:x-ogc:def:crs:EPSG:4326
  202. The GML3.1 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, with data in y/x order:
  203. .. code-block:: xml
  204. <gml:MultiSurface srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  205. <gml:surfaceMember>
  206. <gml:Polygon>
  207. <gml:exterior>
  208. <gml:LinearRing>
  209. <gml:posList>
  210. 37.51099 -88.071564 37.476273 -88.087883
  211. WFS 1.1 output format GML2
  212. ``````````````````````````
  213. * GML2:
  214. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml2
  215. GML2 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, with data in y/x order:
  216. .. code-block:: xml
  217. <gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  218. <gml:polygonMember>
  219. <gml:Polygon><gml:outerBoundaryIs>
  220. <gml:LinearRing>
  221. <gml:coordinates decimal="." cs="," ts=" ">
  222. 37.51099,-88.071564 37.476273,-88.087883
  223. * GML2 reproject to ``EPSG:4326``:
  224. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml2&srsName=EPSG:4326
  225. GML2 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, with data in x/y order:
  226. .. code-block:: xml
  227. <gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  228. <gml:polygonMember>
  229. <gml:Polygon>
  230. <gml:outerBoundaryIs>
  231. <gml:LinearRing>
  232. <gml:coordinates decimal="." cs="," ts=" ">
  233. -88.071564,37.51099 -88.087883,37.476273
  234. .. note:: The `srsName` and `posList` coordinate order are consistent.
  235. This approach can be used to force x/y order.
  236. WFS 1.1 output format GML3
  237. ````````````````````````````
  238. * GML3:
  239. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml3
  240. GML3.1 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, with data in y/x order:
  241. .. code-block:: xml
  242. <gml:MultiSurface srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  243. <gml:surfaceMember>
  244. <gml:Polygon>
  245. <gml:exterior>
  246. <gml:LinearRing>
  247. <gml:posList>
  248. 37.51099 -88.071564 37.476273 -88.087883
  249. * GML3 reproject to ``EPSG:4326``:
  250. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml3&srsName=EPSG:4326
  251. GML3.1 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, *but has changed the data to x/y order*:
  252. .. code-block:: xml
  253. <gml:MultiSurface srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  254. <gml:surfaceMember>
  255. <gml:Polygon>
  256. <gml:exterior>
  257. <gml:LinearRing>
  258. <gml:posList>
  259. -88.071564 37.51099 -88.087883 37.476273
  260. .. note:: The `srsName` and `posList` coordinate order are consistent.
  261. This approach can be used to force x/y order.
  262. * GML3 reproject to ``urn:x-ogc:def:crs:EPSG:4326``
  263. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml3&srsName=urn:x-ogc:def:crs:EPSG:4326
  264. GML3.1 output using ``urn:x-ogc:def:crs:EPSG:4326`` reference and data in y/x order:
  265. .. code-block:: xml
  266. <gml:MultiSurface srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  267. <gml:surfaceMember>
  268. <gml:Polygon>
  269. <gml:exterior>
  270. <gml:LinearRing>
  271. <gml:posList>
  272. -88.071564 37.51099 -88.087883 37.476273
  273. .. note:: The `srsName` and `posList` coordinate order are consistent.
  274. This approach can be used to force x/y order.
  275. WFS 1.1 output format GML32
  276. ````````````````````````````
  277. * GML3.2:
  278. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml32
  279. The GML32 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, with data in y/x order:
  280. .. code-block:: xml
  281. <gml:MultiSurface srsName="urn:ogc:def:crs:EPSG::4326" gml:id="states.1.the_geom">
  282. <gml:surfaceMember><gml:Polygon gml:id="states.1.the_geom.1">
  283. <gml:exterior>
  284. <gml:LinearRing>
  285. <gml:posList>37.51099 -88.071564 37.476273 -88.087883
  286. * GML3.2 reproject to ``EPSG:4326``:
  287. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml32&srsName=EPSG:4326
  288. The GML32 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, with data in x/y order:
  289. .. code-block:: xml
  290. <gml:MultiSurface srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" gml:id="states.1.the_geom">
  291. <gml:surfaceMember>
  292. <gml:Polygon gml:id="states.1.the_geom.1">
  293. <gml:exterior>
  294. <gml:LinearRing>
  295. <gml:posList>-88.071564 37.51099 -88.087883 37.476273
  296. * GML3.2 reproject to ``urn:x-ogc:def:crs:EPSG:4326``:
  297. http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp%3Astates&featureId=states.1&outputFormat=gml32&srsName=urn:x-ogc:def:crs:EPSG:4326
  298. GML3.2 output using ``urn:x-ogc:def:crs:EPSG:4326`` reference and data in y/x order:
  299. .. code-block:: xml
  300. <gml:MultiSurface srsName="urn:ogc:def:crs:EPSG::4326" gml:id="states.1.the_geom">
  301. <gml:surfaceMember>
  302. <gml:Polygon gml:id="states.1.the_geom.1">
  303. <gml:exterior>
  304. <gml:LinearRing><gml:posList>37.51099 -88.071564 37.476273 -88.087883
  305. WFS 2.0 Axis Order
  306. ------------------
  307. **GetCapabilities** describes ``topp:states`` using:
  308. http://localhost:8080/geoserver/ows?service=wfs&version=2.0.0&request=GetCapabilities
  309. .. code-block:: xml
  310. <FeatureType>
  311. <Name>topp:states</Name>
  312. <Title>USA Population</Title>
  313. <Abstract>This is some census data on the states.</Abstract>
  314. <ows:Keywords>
  315. <ows:Keyword>census</ows:Keyword><ows:Keyword>united</ows:Keyword><ows:Keyword>boundaries</ows:Keyword><ows:Keyword>state</ows:Keyword><ows:Keyword>states</ows:Keyword>
  316. </ows:Keywords>
  317. <DefaultCRS>urn:ogc:def:crs:EPSG::4326</DefaultCRS>
  318. <ows:WGS84BoundingBox>
  319. <ows:LowerCorner>-124.731422 24.955967</ows:LowerCorner>
  320. <ows:UpperCorner>-66.969849 49.371735</ows:UpperCorner>
  321. </ows:WGS84BoundingBox>
  322. </FeatureType>
  323. WFS 2.0 describes the ``WGS84BoundingBox`` as a lower and upper corner in x/y order.
  324. .. warning:: This combination is inconsistent with ``DefaultSRS`` definition and the ``LowerCorner`` and ``UpperCorner`` coordinate order and may confuse client applications.
  325. The result matches the WFS 2.0 GetCapabilities examples.
  326. WFS 2.0 *GetFeature* request defaults to GML3.2 output, and the default ``urn:ogc:def:crs:EPSG::4326`` spatial reference system used to publish the layer:
  327. * WFS 2.0 Default:
  328. http://localhost:8080/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp%3Astates&featureId=states.1
  329. The GML3.2 output uses ``urn:ogc:def:crs:EPSG::4326`` reference, with data in y/x order:
  330. .. code-block:: xml
  331. <gml:MultiSurface srsName="urn:ogc:def:crs:EPSG::4326" gml:id="states.1.the_geom">
  332. <gml:surfaceMember>
  333. <gml:Polygon gml:id="states.1.the_geom.1">
  334. <gml:exterior><gml:LinearRing>
  335. <gml:posList>
  336. 37.51099 -88.071564 37.476273 -88.087883
  337. * WFS 2.0 reproject to ``EPSG:4326``:
  338. http://localhost:8080/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp%3Astates&featureId=states.1&srsName=EPSG:4326
  339. The GML3.2 output uses ``http://www.opengis.net/gml/srs/epsg.xml#4326`` reference, with data in x/y order:
  340. .. code-block:: xml
  341. <gml:MultiSurface srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" gml:id="states.1.the_geom">
  342. <gml:surfaceMember>
  343. <gml:Polygon gml:id="states.1.the_geom.1">
  344. <gml:exterior><gml:LinearRing>
  345. <gml:posList>
  346. -88.071564 37.51099 -88.087883 37.476273
  347. * WFS 2.0 reproject to ``urn:ogc:def:crs:EPSG::4326``
  348. http://localhost:8080/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp%3Astates&featureId=states.1&srsName=urn:ogc:def:crs:EPSG::4326
  349. The GML3.2 output uses ``urn:ogc:def:crs:EPSG::4326`` reference, with data in y/x order:
  350. .. code-block:: xml
  351. <gml:MultiSurface srsName="urn:ogc:def:crs:EPSG::4326" gml:id="states.1.the_geom">
  352. <gml:surfaceMember>
  353. <gml:Polygon gml:id="states.1.the_geom.1">
  354. <gml:exterior><gml:LinearRing>
  355. <gml:posList>
  356. 37.51099 -88.071564 37.476273 -88.087883 37.442852
  357. WFS 2.0 output format GML2
  358. ``````````````````````````
  359. * GML2:
  360. http://localhost:8080/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp%3Astates&featureId=states.1&outputFormat=gml2
  361. .. code-block:: xml
  362. <gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  363. <gml:polygonMember>
  364. <gml:Polygon>
  365. <gml:outerBoundaryIs>
  366. <gml:LinearRing>
  367. <gml:coordinates decimal="." cs="," ts=" ">
  368. 37.51099,-88.071564 37.476273,-88.087883
  369. * GML2 reproject to ``EPSG:4326``:
  370. http://localhost:8080/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp%3Astates&featureId=states.1&outputFormat=gml2&srsName=EPSG:4326
  371. .. code-block:: xml
  372. <gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  373. <gml:polygonMember>
  374. <gml:Polygon>
  375. <gml:outerBoundaryIs>
  376. <gml:LinearRing>
  377. <gml:coordinates decimal="." cs="," ts=" ">
  378. -88.071564,37.51099 -88.087883,37.476273
  379. .. note:: The `srsName` and `posList` coordinate order are consistent.
  380. This approach can be used to force x/y order.
  381. * GML2 reproject to ``urn:x-ogc:def:crs:EPSG:4326``:
  382. http://localhost:8080/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp%3Astates&featureId=states.1&outputFormat=gml2&srsName=urn:x-ogc:def:crs:EPSG:4326
  383. .. code-block:: xml
  384. <gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  385. <gml:polygonMember>
  386. <gml:Polygon>
  387. <gml:outerBoundaryIs>
  388. <gml:LinearRing>
  389. <gml:coordinates decimal="." cs="," ts=" ">
  390. 37.51099,-88.071564 37.476273,-88.087883
  391. WFS 2.0 output format GML3
  392. ``````````````````````````
  393. * GML3:
  394. http://localhost:8080/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp%3Astates&featureId=states.1&outputFormat=gml3
  395. .. code-block:: xml
  396. <gml:MultiSurface srsName="urn:x-ogc:def:crs:EPSG:4326">
  397. <gml:surfaceMember>
  398. <gml:Polygon>
  399. <gml:exterior>
  400. <gml:LinearRing>
  401. <gml:posList>
  402. 37.51099 -88.071564 37.476273 -88.087883
  403. * GML3 reproject to ``EPSG:4326``:
  404. http://localhost:8080/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp%3Astates&featureId=states.1&outputFormat=gml3&srsName=EPSG:4326
  405. .. code-block:: xml
  406. <gml:MultiSurface srsName="urn:x-ogc:def:crs:EPSG:4326">
  407. <gml:surfaceMember>
  408. <gml:Polygon>
  409. <gml:exterior>
  410. <gml:LinearRing>
  411. <gml:posList>
  412. -88.071564 37.51099 -88.087883 37.476273
  413. .. warning:: This combination is inconsistent between `srsName` and `posList` coordinate order and may confuse applications expecting a valid GML3 document.
  414. This approach can be used to force x/y order.
  415. * GML3 reproject to ``urn:x-ogc:def:crs:EPSG:4326``:
  416. http://localhost:8080/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp%3Astates&featureId=states.1&outputFormat=gml3&srsName=urn:x-ogc:def:crs:EPSG:4326
  417. .. code-block:: xml
  418. <gml:MultiSurface srsName="urn:x-ogc:def:crs:EPSG:4326">
  419. <gml:surfaceMember>
  420. <gml:Polygon>
  421. <gml:exterior>
  422. <gml:LinearRing>
  423. <gml:posList>
  424. 37.51099 -88.071564 37.476273 -88.087883
  425. WFS 2.0 output format GML32
  426. ```````````````````````````
  427. * GML32:
  428. http://localhost:8080/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp%3Astates&featureId=states.1&outputFormat=gml32
  429. .. code-block:: xml
  430. <gml:MultiSurface srsName="urn:ogc:def:crs:EPSG::4326" gml:id="states.1.the_geom">
  431. <gml:surfaceMember>
  432. <gml:Polygon gml:id="states.1.the_geom.1"><gml:exterior>
  433. <gml:LinearRing>
  434. <gml:posList>
  435. 37.51099 -88.071564 37.476273 -88.087883
  436. * GML32 reproject to ``EPSG:4326``:
  437. http://localhost:8080/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp%3Astates&featureId=states.1&outputFormat=gml32&srsName=EPSG:4326
  438. .. code-block:: xml
  439. <gml:MultiSurface srsName="urn:ogc:def:crs:EPSG::4326" gml:id="states.1.the_geom">
  440. <gml:surfaceMember>
  441. <gml:Polygon gml:id="states.1.the_geom.1"><gml:exterior>
  442. <gml:LinearRing>
  443. <gml:posList>
  444. -88.071564 37.51099 -88.087883 37.476273
  445. .. warning:: This combination is inconsistent between `srsName` and `posList` coordinate order and may confuse applications expecting a valid GML3 document.
  446. This approach can be used to force x/y order.
  447. * GML32 reproject to ``urn:x-ogc:def:crs:EPSG:4326``:
  448. http://localhost:8080/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp%3Astates&featureId=states.1&outputFormat=gml32&srsName=urn:x-ogc:def:crs:EPSG:4326
  449. .. code-block:: xml
  450. <gml:MultiSurface srsName="urn:ogc:def:crs:EPSG::4326" gml:id="states.1.the_geom">
  451. <gml:surfaceMember>
  452. <gml:Polygon gml:id="states.1.the_geom.1"><gml:exterior>
  453. <gml:LinearRing>
  454. <gml:posList>
  455. 37.51099 -88.071564 37.476273 -88.087883