You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bp/index.html
+209Lines changed: 209 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2696,6 +2696,28 @@ <h4 class="subhead">Possible Approach to Implementation</h4>
2696
2696
<p>For this reason, whenever using <a>WKT</a> to encode <a>geometries</a>, it is important that the reference <a>WKT</a> specification can be unambiguously determined.</p>
2697
2697
</aside>
2698
2698
</li>
2699
+
<li>
2700
+
<p>Support advertising the used <a>CRS</a> in the endpoint serving the data.</p>
2701
+
<p>Because of the inconsistent provision of CRS metadata in geospatial encodings and the continued confusion caused by the axis order of coordinates, OGC API Features part 2 [[OAF2]] defines a mechanism for a server to clearly and unambiguously assert the CRS and axis order being used in a response document independent of the requested output format. The method used is an HTTP header named <code>Content-Crs</code> containing a URI identifying the <a>CRS</a>. </p>
2702
+
<asideclass="example" id="advertise-crs-oaf" title="Advertise CRS using OGC API Features building block">
Support requesting and returning geometries in a specific requested CRS
3749
+
</span></p>
3750
+
<pclass="practicedesc">
3751
+
If you expose spatial data in various <a>CRS</a>s via an API or other data access endpoint, offer a way for users to find out which CRSs are available, to do requests, and to access geometries in the CRS of their choice.
3752
+
</p>
3753
+
</div>
3754
+
3755
+
<sectionclass="axioms">
3756
+
<h4class="subhead">Why</h4>
3757
+
<p>
3758
+
It is often useful to make <a>geometries</a> available in different <a>CRS</a>s. <ahref="#bp-crs-choice" class="sectionRef"></a> describes why this is a good idea as well as how to decide which CRSs to provide. <ahref="#bp-crs" class="sectionRef"></a> explains how the CRS of geometries should be made known. It follows that the default CRS that is offered should be WGS-84; and further that users should be able to find out which other CRSs are available and access geometries in the CRS of their choice.
3759
+
</p>
3760
+
</section>
3761
+
<sectionclass="outcome">
3762
+
<h4class="subhead">Intended Outcome</h4>
3763
+
<p>
3764
+
The endpoint allows the discovery of the supported <a>CRS</a>s and provides the ability to access geometries in the CRS of the user's choice.
3765
+
</p>
3766
+
</section>
3767
+
<sectionclass="how">
3768
+
<h4class="subhead">Possible Approach to Implementation</h4>
3769
+
3770
+
<p>It is generally recommended to limit the number of supported <a>CRS</a>s in a data dissemination endpoint for clarity. Only support <a>CRS</a>s that make sense for the data. If a <a>CRS</a> doesn't cover the data, do not support it.</p>
3771
+
3772
+
<p>Offering geospatial data in different <a>CRS</a> in practice means the data needs to be transformed from the storage <a>CRS</a> to other supported <a>CRS</a>s. Depending on the storage format, it may or may not be possible to let a fast implementation like a database handle the reprojection. When supporting multiple <a>CRS</a>s through the API, it is recommended to have a mechanism in place to do the conversion. Many programming languages support libraries that can handle this. Since geographic data can be large and complex, it is recommended to cache the converted data for reuse by another client, or the same client at a later time. This eliminates the need of reprojecting the same data more than once. </p>
3773
+
3774
+
<p>For Web APIs, CRS support should be offered in conformance to the OGC API building blocks related to CRS [[OAF2]]. These building blocks can be supported in any Web API: </p>
3775
+
3776
+
<ul>
3777
+
<li>Users can discover the supported CRS by going to the collection object of a spatial thing. The collection contains a <code>crs</code> property which contains the identifiers for the list of CRSs supported by the server for that collection.</li>
3778
+
<li>Users can request spatial things by sending a bounding box using coordinates in the <a>CRS</a> of their choice. The API supports a <code>bbox-crs</code> parameter in order to do this.</li>
3779
+
<li>Users can request that spatial things are returned in the <a>CRS</a> of their choice. The API supports a <code>crs</code> parameter to this end. If the <code>crs</code> parameter is absent, spatial features are returned in the default <a>CRS</a>, which is WGS-84 (that is, http://www.opengis.net/def/crs/OGC/1.3/CRS84 for coordinates without ellipsoidal height and http://www.opengis.net/def/crs/OGC/0/CRS84h for coordinates with ellipsoidal height).</li>
3780
+
<li>Not every geometry representation format supports different <a>CRS</a>s. If the user requests a content format that doesn't, the spatial things should not be returned in that format with coordinates in the requested CRS. Note that GeoJSON normatively supports WGS 84, but the "prior arrangement" provision allows other coordinate systems to be used. An explicit request by a client with a query parameter crs establishes a prior arrangement.</li>
3781
+
</ul>
3782
+
<asideclass="example" id="example-oaf-collections" title="Example of OGC API Features Collections endpoint">
3783
+
Response body of an OGC API Features /Collections endpoint with support for 5 coordinate reference systems:
<p>In linked data endpoints, [[GeoSPARQL]] can be used to support user-requested <a>CRS</a>s.</p>
3904
+
<p>In [[GeoSPARQL]] the <code>getSRID</code> function returns the spatial reference system of a <a>geometry</a>, thus making it possible to request a specific CRS at a (Geo)SPARQL endpoint.
3905
+
</p>
3906
+
<asideclass="example">
3907
+
<pclass="issue">TBD provide an example of requesting a specific CRS using GeoSPARQL</p>
3908
+
</aside>
3909
+
</section>
3910
+
<sectionclass="test">
3911
+
<h4class="subhead">How to Test</h4>
3912
+
<p>
3913
+
Check if a test client can discover the supported CRSs, request spatial things using a bounding box in one of the supported CRS, and if the spatial things are returned in the requested CRS.
3914
+
</p>
3915
+
</section>
3916
+
<sectionclass="ucr">
3917
+
<h4class="subhead">Evidence</h4>
3918
+
<p><span>Relevant requirements</span>: <ahref="https://www.w3.org/TR/sdw-ucr/#MultipleCRS">R-MultipleCRSs</a>, <ahref="https://www.w3.org/TR/sdw-ucr/#AvoidCoordinateTransformations">R-AvoidCoordinateTransformations</a>, and <ahref="https://www.w3.org/TR/sdw-ucr/#DeterminableCRS">R-DeterminableCRS</a>.
0 commit comments