Skip to content

Commit

Permalink
Carto. layout class sepration@grid-crss. issue #97
Browse files Browse the repository at this point in the history
  • Loading branch information
joanma747 committed Nov 19, 2022
1 parent 4a79e94 commit dec8052
Show file tree
Hide file tree
Showing 18 changed files with 138 additions and 72 deletions.
6 changes: 3 additions & 3 deletions core/standard/clause_2_conformance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ The _maps background_ conformance class allows requesting a particular backgroun
|Map |`/map?bgcolor={bgcolor}&transparent={transparent},...`
|===

*<<rc_cartographic-layout>>* (http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/cartographic-layout)
*<<rc_cartographic-layout>>* (http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/cartographic-layout-title, http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/cartographic-layout-legend, http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/cartographic-layout-scale-bar, http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/cartographic-layout-compass, http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/cartographic-layout-situation-map, http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/cartographic-layout-attribution, and http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/cartographic-layout-grid-crss)

The _maps cartographic layout_ conformance class allows adding a title, a legend, a scale bar, a compass, a situation map, an attribution text a lat/long graticule, and a CRS grid directly on top of a map.
The _maps cartographic layout_ conformance classes allow adding a title, a legend, a scale bar, a compass, a situation map, an attribution text, and lat/long graticules and a CRS grids directly on top of a map.

[#table_resource_cartographic-layout,reftext='{table-caption} {counter:table-num}']
.Overview of resource and common direct links that corresponds to the cartographic layout
[cols="33,66",options="header"]
|===
|Resource name |Example of possible paths
|Map |`/map?map-title={map-title}&legend={legend}&scale-bar={scale-bar}&compass={compass}&situation-map={situation-map}&graticule={graticule}&crs-grid={crs-grid}&attribution=attribution...`
|Map |`/map?map-title=topCenter&map-legend=middleRight&scale-bar=bottomCenter&map-compass=topLeft&situation-map=bottomLeft&grid-crss=CRS:84,EPSG:32831&map-attribution=bottomRight`
|===

*<<rc_collections-selection>>* (http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/collections-selection)
Expand Down
57 changes: 41 additions & 16 deletions core/standard/clause_7b_map_paramsCartographicLayout.adoc
Original file line number Diff line number Diff line change
@@ -1,51 +1,76 @@
[[rc_cartographic-layout]]
== Requirement Class "Map Cartographic Layout"
== Requirement Classes for a "Map Cartographic Layout"

=== Overview

[[background-overview]]
This section describes a series of small requirement classes dealing with adding cartographic layout elements such as a title, a legend, a scale bar, a compass, a situation map, an attribution text or logo, and CRS grids and lat/long graticules to the map.

include::requirements/requirements_class_cartographic-layout.adoc[]

This requirement class describes how to add cartographic layout elements such as a title, a legend, a scale bar, a compass, a situation map, an attribution text or logo, a lat/long graticule, and a CRS grid to the map.

Many of these cartographic layout elements can be better generated and controlled by the client that shows the map, in particular if a map is going to be presented overlaid with other maps these server rendered elements may interfere and collide, impeding the correct visualization. So server side cartographic layout is reserved to create maps that are going to be used as static illustrations (e.g. as images in web pages). If the map is going to be presented alone as an illustration, these cartographic layout elements could be make the map more informative and more "cartographic" (see for example https://reference.yourdictionary.com/resources/5-basic-parts-of-any-map.html). This requirements class has been designed in a way that gives complete freedom to the server for the style of this elements. In some cases, the server can even decide not to show them despite the client request.
Many of these cartographic layout elements can be better directly generated and controlled by the client that shows the map, in particular if a map is going to be presented overlaid with other maps these server rendered elements may interfere and collide, impeding the correct visualization. So requesting layout elements to the API to force the server to render them (as described in this section) is reserved to some particular use cases such as to create maps that are going to be used as static illustrations (e.g. as images in web pages). If the map is going to be presented alone as an illustration, these cartographic layout elements could make the map more informative and more "cartographic" (see for example https://reference.yourdictionary.com/resources/5-basic-parts-of-any-map.html). These requirements classes have been designed in a way that gives complete freedom to the server for the style of this elements. In some cases, the server can even decide not to show them despite the client request. Future extensions to this conformance classes may reduce the freedom to the server.

=== Map operation

The map core of this standard defines how to get a map. This requirements class specifies parameters to add some cartographic layout elements on top of it
The map core of this standard defines how to get a map. Each requirements class in this section specifies a parameter to add a cartographic layout element on top of a map

==== Parameters for map cartographic layout elements

The title, legend, scale-bar, compass, situation-map, attribution, graticule and crs-grid, parameters indicate if and where the cartographic layout elements will be situated on top of the map.
The title, legend, scale-bar, compass, situation-map, attribution, grid-crs, parameters indicate if and where the cartographic layout elements should be situated on top of the map.

==== Parameter map-title

include::requirements/requirements_class_cartographic-layout-title.adoc[]

include::requirements/cartographic-layout/REQ_map-title-definition.adoc[]

NOTE: The style and size of the text of the title is at complete discretion of the server

==== Parameter map-legend

include::requirements/requirements_class_cartographic-layout-legend.adoc[]

include::requirements/cartographic-layout/REQ_legend-definition.adoc[]

==== Parameter scale-bar

include::requirements/requirements_class_cartographic-layout-scale-bar.adoc[]

include::requirements/cartographic-layout/REQ_scale-bar-definition.adoc[]

==== Parameter map-compass

include::requirements/requirements_class_cartographic-layout-compass.adoc[]

include::requirements/cartographic-layout/REQ_compass-definition.adoc[]

NOTE: It is up to de server to decide how the compass can look like being some possibilities a full wind rose or a simple arrow to the north.

==== Parameter situation-map

include::requirements/requirements_class_cartographic-layout-situation-map.adoc[]

include::requirements/cartographic-layout/REQ_situation-map-definition.adoc[]

==== Parameter map-attribution

include::requirements/requirements_class_cartographic-layout-attribution.adoc[]

include::requirements/cartographic-layout/REQ_attribution-definition.adoc[]

NOTE: The attribution may be represented as a text naming the responsible party of the data represented in the map or a logo of the responsible party organzation.
NOTE: The attribution may be represented as a text naming the responsible party of the data represented in the map or a logo of the responsible party organization.

==== Parameter map-grid-crs

include::requirements/requirements_class_cartographic-layout-grid-crs.adoc[]

include::requirements/cartographic-layout/REQ_graticule-definition.adoc[]
include::requirements/cartographic-layout/REQ_grid-crs-definition.adoc[]

NOTE: A graticule is a network of lines on a map that delineate the geographic expressed as lines of equal latitude or longitude (a.k.a. meridians and parallels). A graticule added to a map in a lat/long CRS (such as CRS:84) will appear as a set of vertical and horizontal strait lines. In other CRSs, meridians a parallels may result in curbed lines.
NOTE: A graticule is a network of lines on a map that delineate the geographic expressed as lines of equal latitude or longitude (a.k.a. meridians and parallels). A graticule can be added to a map by requesting a lat/long CRS (such as CRS:84). If the CRS of the map is the same as the one requested by this parameter, the grid will appear as a set of vertical and horizontal strait lines. In other CRSs, meridians a parallels may result in curbed lines.

include::requirements/cartographic-layout/REQ_crs-grid-definition.adoc[]
NOTE: A CRS grid is a network of lines on a map that delineate the CRS coordinates expressed as lines of equal X or Y. If the CRS of the map is the same as the one requested by this parameter, the results in a set of vertical and horizontal strait lines.

NOTE: A CRS grid is a network of lines on a map that delineate the CRS coordinates expressed as lines of equal X or Y. A CRS grid added results in a set of vertical and horizontal strait lines.
NOTE: Commonly only one or two CRS values will be provided in this list (e.g. one graticule and another in the CRS of the projection). In some areas where there is two or more official CRS projections, three CRSs could be needed in the list. Adding more that three CRSs in the NOTE: A CRS grid is a network of lines on a map that delineate the CRS coordinates expressed as lines of equal X or Y. If the CRS of the map is the same as the one requested by this parameter, the results in a set of vertical and horizontal strait lines.
list is expected to results in a very confusing presentation with too many lines.

NOTE: It is possibly that graticules and CRS grids are presented in a different thickness and colors that contrast better with the map. It is also possible that a grid has more than one color or thickness to emphasize different densities of the grid. An alternative or complementary style could be to use margins and rulers showing coordinate numbers. All this variations are at the discretion of the server and cannot be controlled from the client.
NOTE: It is possibly that graticules and CRS grids are presented in a different thickness and colors that contrast better with the map. It is also possible that a grid has more than one color or thickness to emphasize different densities of the grid. An alternative or complementary style could be the use of margins and rulers showing coordinate numbers. All these variations are at the discretion of the server and cannot be controlled from the client using this conformance class.

==== Response
A successful GET response is described in the core class (http://www.opengis.net/spec/ogcapi-maps-1/1.0/conf/core). Some of this cartographic layout elements can be executed in different ways by the server. In some cases the server can decide that some elements are inappropriate or there is no space to add them. The standard does not impose any extra requirements on the response.
A successful GET response is described in the core class (http://www.opengis.net/spec/ogcapi-maps-1/1.0/conf/core). Some of these cartographic layout elements can be interpreted and executed in different ways by the server. In some cases the server can decide that some elements are inappropriate or there is no space to add them. The standard does not impose any extra requirements on the response.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[[req_decorations_attribution-definition]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/decorations/attribution-definition*
^|A |The map operation SHALL support an optional parameter `attribution` with the characteristics defined in the OpenAPI Specification 3.0 fragment
^|*Requirement {counter:req-id}* |*/req/cartographic-layout/attribution-definition*
^|A |The map operation SHALL support an optional parameter `map-attribution` with the characteristics defined in the OpenAPI Specification 3.0 fragment
[source,YAML]
----
name: attribution
name: map-attribution
in: query
required: false
description: Add a attribution into the map
style: form
schema:
Expand All @@ -23,5 +24,5 @@
- bottomRight
default: none
----
^|B |The absence of the parameter `attribution` or the value `none` SHALL be interpreted as "no attribution in the map". Other values SHALL be interpreted as the position where the attribution should appear
^|B |The absence of the parameter `map-attribution` or the value `none` SHALL be interpreted as "no attribution in the map". Other values SHALL be interpreted as the position where the attribution should appear
|===
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[[req_decorations_compass-definition]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/decorations/compass-definition*
^|A |The map operation SHALL support an optional parameter `compass` with the characteristics defined in the OpenAPI Specification 3.0 fragment
^|*Requirement {counter:req-id}* |*/req/cartographic-layout/compass-definition*
^|A |The map operation SHALL support an optional parameter `map-compass` with the characteristics defined in the OpenAPI Specification 3.0 fragment
[source,YAML]
----
name: compass
name: map-compass
in: query
required: false
description: Add a compass into the map
style: form
schema:
Expand All @@ -23,5 +24,5 @@
- bottomRight
default: none
----
^|B |The absence of the parameter `compass` or the value `none` SHALL be interpreted as "no compass in the map". Other values SHALL be interpreted as the position where the compass should appear
^|B |The absence of the parameter `map-compass` or the value `none` SHALL be interpreted as "no compass in the map". Other values SHALL be interpreted as the position where the compass should appear
|===

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[[req_decorations_crs-grid-definition]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/cartographic-layout/grid-crs-definition*
^|A |The map operation SHALL support an optional parameter `grid-crss` with the characteristics defined in the OpenAPI Specification 3.0 fragment
[source,YAML]
----
name: grid-crss
in: query
required: false
description: Add one or more grid crss or graticules into the map
style: form
explode: false
schema:
type: array
items:
type: string
----
^|B |Each name in the comma separated list in the value of the `grid-crss` SHALL be interpreted as a CRS name. For each CRS in the list, if the CRS coordinates are lat/long the server shall interpret the request for a graticule and otherwise the server shall interpret the request of a CRS grid.
^|C |The absence of the parameter `grid-crss` SHALL be interpreted as "neither CRS grid nor graticule in the map".
|===
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[[req_decorations_legend-definition]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/decorations/legend-definition*
^|A |The map operation SHALL support an optional parameter `legend` with the characteristics defined in the OpenAPI Specification 3.0 fragment
^|*Requirement {counter:req-id}* |*/req/cartographic-layouts/legend-definition*
^|A |The map operation SHALL support an optional parameter `map-legend` with the characteristics defined in the OpenAPI Specification 3.0 fragment
[source,YAML]
----
name: legend
name: map-legend
in: query
required: false
description: Add a legend into the map
style: form
schema:
Expand All @@ -23,5 +24,5 @@
- bottomRight
default: none
----
^|B |The absence of the parameter `legend` or the value `none` SHALL be interpreted as "no legend in the map". Other values SHALL be interpreted as the position where the legend should appear
^|B |The absence of the parameter `map-legend` or the value `none` SHALL be interpreted as "no legend in the map". Other values SHALL be interpreted as the position where the legend should appear
|===
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[[req_decorations_map-title-definition]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/decorations/map-title-definition*
^|*Requirement {counter:req-id}* |*/req/cartographic-layout/map-title-definition*
^|A |The map operation SHALL support an optional parameter `map-title` with the characteristics defined in the OpenAPI Specification 3.0 fragment
[source,YAML]
----
name: map-title
in: query
description: a title into the map
required: false
description: a title into the map
style: form
schema:
type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[[req_decorations_scale-bar-definition]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/decorations/scale-bar-definition*
^|*Requirement {counter:req-id}* |*/req/cartographic-layout/scale-bar-definition*
^|A |The map operation SHALL support an optional parameter `scale-bar` with the characteristics defined in the OpenAPI Specification 3.0 fragment
[source,YAML]
----
name: scale-bar
in: query
required: false
description: Add a scale bar into the map
style: form
schema:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[[req_decorations_situation-map-definition]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/decorations/situation-map-definition*
^|*Requirement {counter:req-id}* |*/req/cartographic-layout/situation-map-definition*
^|A |The map operation SHALL support an optional parameter `situation-map` with the characteristics defined in the OpenAPI Specification 3.0 fragment
[source,YAML]
----
name: situation-map
in: query
required: false
description: Add a situation-map into the map
style: form
schema:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[rc_maps-cartographic-layout-attribution]]
[cols="1,4",width="90%"]
|===
2+|*Requirements Class Cartographic Layout Attribution*
2+|http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/cartographic-layout-attribution
|Target type |Web API
|Dependency |http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/core
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[rc_maps-cartographic-layout-compass]]
[cols="1,4",width="90%"]
|===
2+|*Requirements Class Cartographic Layout Compass*
2+|http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/cartographic-layout-compass
|Target type |Web API
|Dependency |http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/core
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[rc_maps-cartographic-layout-grid-crss]]
[cols="1,4",width="90%"]
|===
2+|*Requirements Class Cartographic Layout Grid CRSs*
2+|http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/cartographic-layout-grid-crss
|Target type |Web API
|Dependency |http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/core
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[rc_maps-cartographic-layout-legend]]
[cols="1,4",width="90%"]
|===
2+|*Requirements Class Cartographic Layout Legend*
2+|http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/cartographic-layout-legend
|Target type |Web API
|Dependency |http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/core
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[rc_maps-cartographic-layout-scale-bar]]
[cols="1,4",width="90%"]
|===
2+|*Requirements Class Cartographic Layout Scale BAr*
2+|http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/cartographic-layout-scale-bar
|Target type |Web API
|Dependency |http://www.opengis.net/spec/ogcapi-maps-1/1.0/req/core
|===
Loading

0 comments on commit dec8052

Please sign in to comment.