Skip to content

Commit

Permalink
support bounding boxes that span the antimeridian
Browse files Browse the repository at this point in the history
resolves #31

Note that OpenAPI includes and links still go to the master branch,
i.e. will only be updated once the changes have been merged.
  • Loading branch information
cportele committed Jan 29, 2018
1 parent c9e1e0f commit c7b49c9
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 33 deletions.
18 changes: 12 additions & 6 deletions core/openapi/parameters/bbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@ name: bbox
in: query
description: >-
Only features that have a geometry that intersects the bounding box are selected. The bounding box is provided as four numbers:
* Lower corner, coordinate axis 1 (minimum longitude)
* Lower corner, coordinate axis 2 (minimum latitude)
* Upper corner, coordinate axis 1 (maximum longitude)
* Upper corner, coordinate axis 2 (maximum latitude)
* Left box edge, coordinate axis 1
* Bottom box edge, coordinate axis 2
* Right box edge, coordinate axis 1
* Top box edge, coordinate axis 2
For WGS84 longitude/latitude this is in most cases the sequence of
minimum longitude, minimum latitude, maximum longitude and maximum latitude.
However, in cases where the box spans the antimeridian the first value
(left = west-most box edge) is larger than the third value (right = east-most
box edge).
required: false
schema:
type: array
Expand All @@ -17,4 +23,4 @@ schema:
minimum: -180
maximum: 180
style: form
explode: false
explode: false
4 changes: 2 additions & 2 deletions core/openapi/schemas/bbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ properties:
- http://www.opengis.net/def/crs/OGC/1.3/CRS84
default: http://www.opengis.net/def/crs/OGC/1.3/CRS84
bbox:
description: minimum longitude, minimum latitude, maximum longitude, maximum latitude
description: west, north, east, south edges of the bounding box
type: array
items:
minItems: 4
Expand All @@ -20,4 +20,4 @@ properties:
- -180
- -90
- 180
- 90
- 90
1 change: 1 addition & 0 deletions core/standard/annex-history.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
|2017-10-11 |0.2 |C. Portele |all |changes discussed in SWG/PT call on 2017-10-09
|2017-12-13 |0.3 |C. Portele |all |address issues #2, #5, #6, #7, #8, #14, #15, #19
|2018-01-22 |0.4 |C. Portele |7 |add description of the UML diagram
|2018-01-29 |0.5 |C. Portele |7.9.4 |address issue #31 (use west, south, east, north in bbox)
|===
20 changes: 16 additions & 4 deletions core/standard/clause_7_core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -654,12 +654,24 @@ part of the result set, if the `bbox` parameter is provided.

The bounding box is provided as four numbers:

* Lower corner, coordinate axis 1 (minimum longitude)
* Lower corner, coordinate axis 2 (minimum latitude)
* Upper corner, coordinate axis 1 (maximum longitude)
* Upper corner, coordinate axis 2 (maximum latitude)
* Left box edge, coordinate axis 1
* Bottom box edge, coordinate axis 2
* Right box edge, coordinate axis 1
* Top box edge, coordinate axis 2
|===

For WGS84 longitude/latitude this is in most cases the sequence of
minimum longitude, minimum latitude, maximum longitude and maximum latitude.
However, in cases where the box spans the antimeridian the first value
(left = west-most box edge) is larger than the third value (right = east-most
box edge).

.The bounding box of the New Zealand Exclusive Economic Zone
=================
The bounding box of the New Zealand Exclusive Economic Zone in WGS84 (from 160.6°E to 170°W and from 55.95°S to 25.89°S)
would be represented in JSON as `[ 160.6, -55.95, -170, -25.89 ]`.
=================

A template for the definition of the parameter in YAML according to
OpenAPI 3.0 is available at
link:https://raw.githubusercontent.com/opengeospatial/WFS_FES/master/core/openapi/parameters/bbox.yaml[bbox.yaml].
Expand Down
43 changes: 33 additions & 10 deletions docs/17-069.html
Original file line number Diff line number Diff line change
Expand Up @@ -2341,23 +2341,39 @@ <h4 id="_parameter_bbox"><a class="anchor" href="#_parameter_bbox"></a>7.9.4. Pa
<div class="ulist">
<ul>
<li>
<p>Lower corner, coordinate axis 1 (minimum longitude)</p>
<p>Left box edge, coordinate axis 1</p>
</li>
<li>
<p>Lower corner, coordinate axis 2 (minimum latitude)</p>
<p>Bottom box edge, coordinate axis 2</p>
</li>
<li>
<p>Upper corner, coordinate axis 1 (maximum longitude)</p>
<p>Right box edge, coordinate axis 1</p>
</li>
<li>
<p>Upper corner, coordinate axis 2 (maximum latitude)</p>
<p>Top box edge, coordinate axis 2</p>
</li>
</ul>
</div></div></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>For WGS84 longitude/latitude this is in most cases the sequence of
minimum longitude, minimum latitude, maximum longitude and maximum latitude.
However, in cases where the box spans the antimeridian the first value
(left = west-most box edge) is larger than the third value (right = east-most
box edge).</p>
</div>
<div class="exampleblock">
<div class="title">Example 4. The bounding box of the New Zealand Exclusive Economic Zone</div>
<div class="content">
<div class="paragraph">
<p>The bounding box of the New Zealand Exclusive Economic Zone in WGS84 (from 160.6°E to 170°W and from 55.95°S to 25.89°S)
would be represented in JSON as <code>[ 160.6, -55.95, -170, -25.89 ]</code>.</p>
</div>
</div>
</div>
<div class="paragraph">
<p>A template for the definition of the parameter in YAML according to
OpenAPI 3.0 is available at
<a href="https://raw.githubusercontent.com/opengeospatial/WFS_FES/master/core/openapi/parameters/bbox.yaml">bbox.yaml</a>.</p>
Expand Down Expand Up @@ -2505,7 +2521,7 @@ <h4 id="_parameters_for_filtering_on_feature_properties"><a class="anchor" href=
</tbody>
</table>
<div class="exampleblock">
<div class="title">Example 4. An additional parameter to filter buildings based on their function</div>
<div class="title">Example 5. An additional parameter to filter buildings based on their function</div>
<div class="content">
<div class="listingblock">
<div class="content">
Expand Down Expand Up @@ -2605,7 +2621,7 @@ <h4 id="_response_2"><a class="anchor" href="#_response_2"></a>7.9.7. Response</
</table>
</div>
<div class="exampleblock">
<div class="title">Example 5. Links</div>
<div class="title">Example 6. Links</div>
<div class="content">
<div class="paragraph">
<p>If the request is to return features from the 51st feature, using the default value of the <code>count</code> parameter "10", the links in the response could be (in this example represented as link headers):</p>
Expand Down Expand Up @@ -2793,7 +2809,7 @@ <h4 id="_response_3"><a class="anchor" href="#_response_3"></a>7.10.2. Response<
</table>
</div>
<div class="exampleblock">
<div class="title">Example 6. Links</div>
<div class="title">Example 7. Links</div>
<div class="content">
<div class="paragraph">
<p>The links in a feature could be (in this example represented as link headers):</p>
Expand Down Expand Up @@ -3533,7 +3549,7 @@ <h3 id="exceptions"><a class="anchor" href="#exceptions"></a>9.3. Exceptions</h3
</table>
</div>
<div class="exampleblock">
<div class="title">Example 7. An exception response object definition</div>
<div class="title">Example 8. An exception response object definition</div>
<div class="content">
<div class="listingblock">
<div class="content">
Expand Down Expand Up @@ -3935,7 +3951,7 @@ <h3 id="_wfs_as_a_restful_service"><a class="anchor" href="#_wfs_as_a_restful_se
</tbody>
</table>
<div class="exampleblock">
<div class="title">Example 8. An unsafe implementation of GET</div>
<div class="title">Example 9. An unsafe implementation of GET</div>
<div class="content">
<div class="paragraph">
<p>An unsafe implementation of the GET method would be to use the GET method to delete resource from the server using a URL such as " GET /buildings/1013/delete".</p>
Expand Down Expand Up @@ -4652,6 +4668,13 @@ <h2 id="_revision_history"><a class="anchor" href="#_revision_history"></a>Annex
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><p class="tableblock">7</p></td>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><p class="tableblock">add description of the UML diagram</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><p class="tableblock">2018-01-29</p></td>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><p class="tableblock">0.5</p></td>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><p class="tableblock">C. Portele</p></td>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><p class="tableblock">7.9.4</p></td>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><p class="tableblock">address issue #31 (use west, south, east, north in bbox)</p></td>
</tr>
</tbody>
</table>
<div style="page-break-after: always;"></div>
Expand All @@ -4678,7 +4701,7 @@ <h2 id="Bibliography"><a class="anchor" href="#Bibliography"></a>Annex E: Biblio
</div>
<div id="footer">
<div id="footer-text">
Last updated 2018-01-22 18:36:47 CET
Last updated 2018-01-29 13:59:29 CET
</div>
</div>
</body>
Expand Down
16 changes: 11 additions & 5 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,16 @@ components:
description: >-
Only features that have a geometry that intersects the bounding box are selected. The bounding box is provided as four numbers:
* Lower corner, coordinate axis 1 (minimum longitude)
* Lower corner, coordinate axis 2 (minimum latitude)
* Upper corner, coordinate axis 1 (maximum longitude)
* Upper corner, coordinate axis 2 (maximum latitude)
* Left box edge, coordinate axis 1
* Bottom box edge, coordinate axis 2
* Right box edge, coordinate axis 1
* Top box edge, coordinate axis 2
For WGS84 longitude/latitude this is in most cases the sequence of
minimum longitude, minimum latitude, maximum longitude and maximum latitude.
However, in cases where the box spans the antimeridian the first value
(left = west-most box edge) is larger than the third value (right = east-most
box edge).
required: false
schema:
type: array
Expand Down Expand Up @@ -324,7 +330,7 @@ components:
- http://www.opengis.net/def/crs/OGC/1.3/CRS84
default: http://www.opengis.net/def/crs/OGC/1.3/CRS84
bbox:
description: minimum longitude, minimum latitude, maximum longitude, maximum latitude
description: west, north, east, south edges of the bounding box
type: array
items:
minItems: 4
Expand Down
17 changes: 11 additions & 6 deletions swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,16 @@ parameters:
Only features that have a geometry that intersects the bounding box are
selected. The bounding box is provided as four numbers:
* Lower corner, coordinate axis 1 (minimum longitude) * Lower corner,
coordinate axis 2 (minimum latitude) * Upper corner, coordinate axis 1
(maximum longitude) * Upper corner, coordinate axis 2 (maximum latitude)
* Left box edge, coordinate axis 1
* Bottom box edge, coordinate axis 2
* Right box edge, coordinate axis 1
* Top box edge, coordinate axis 2
For WGS84 longitude/latitude this is in most cases the sequence of
minimum longitude, minimum latitude, maximum longitude and maximum latitude.
However, in cases where the box spans the antimeridian the first value
(left = west-most box edge) is larger than the third value (right = east-most
box edge).
type: array
items:
type: number
Expand Down Expand Up @@ -254,9 +261,7 @@ definitions:
- 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'
default: 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'
bbox:
description: >-
minimum longitude, minimum latitude, maximum longitude, maximum
latitude
description: west, north, east, south edges of the bounding box
type: array
items:
minItems: 4
Expand Down

0 comments on commit c7b49c9

Please sign in to comment.