63 | | TBD |
64 | | Parametrized |
| 65 | A final section is dedicated to the customization of axis label when using an Index CRS. This can be useful when migrating existing application to 9.x releases. Prior versions of `rasdaman` do not support index CRSs. |
| 66 | |
| 67 | The management of CRSs metadata was usually done ''in house'', with default axis labels to `x`, `y`, `z`, `t`, and so on, independently of the native CRS assigned to a coverage. The outsourcing of CRS metadata handling to the [SecoreUserGuide SECORE] resolver (official [http://external.opengeospatial.org/twiki_public/CRSdefinitionResolver/WebHome OGC resolver] for CRS related resources) imposes less freedom on the choice of axis labels on one hand (you have to use the official abbreviations), while developing a more transparent and more ruled framework. |
| 68 | |
| 69 | While geodetic reference systems from [http://www.epsg-registry.org/ EPSG] are not customizable (let's say they are read-only CRSs), our index CRSs (and as well [PetascopeTimeHandling time] ones) are constructed by splitting each concept into a ''template'' and a ''parametrization'' of the template. |
| 70 | |
| 71 | Indeed you can see in our resolver that every `OGC:Index`''n''`D` CRS is associated with its template `OGC:.Index`''n''`D-template`, the latter being the template and the former being its parametrization. You can notice the period `.` prefix in the templates CRS code, which (like in unix file systems) denotes an hidden resource: indeed users shall not reference the templates when setting the native CRS (URI) to a coverage, but rather always use the parametrizations. A Parametrized CRS (P-CRS) is like piggy-backed on a template: it provides one or more parameters to the enduser for customizing the content of the template ''target'' CRS definition. Parameters are set by the user by means of key-value pairs in the query of a URI. |
| 72 | |
| 73 | When default values for all the parameters offered by a P-CRS, then querying the P-CRS URI without any query part (`?key=value[&key=value[&...]]`) is doable: the template resource is returned (that is, the template resource where parameters values have been set to their defaults defined in the P-CRS), and the user can blissfully ignore the (relative) complexities of parametrization. |
| 74 | |
| 75 | Our index CRSs indeed are P-CRSs with parameters to customize the labels of the axes, which by default are `i`, `j` and `k` (4+ dimensinal index CRSs are yet to be defined). |
| 76 | This was also due to the necessity to avoid label clashes when 2+ index CRSs of the same kind are used within the same coverage. |
| 77 | |
| 78 | If a P-CRS is requested with no subelement expansion (see #364), then the behind-the-scenes definition of a P-CRS can be visualized. |
| 79 | For instance, our `OGC:Index1D` CRS is: |
| 80 | |
| 81 | {{{ |
| 82 | #!xml |
| 83 | <ParameterizedCRS gml:id="param-index1d-crs" |
| 84 | xmlns="http://www.opengis.net/crs-nts/1.0" |
| 85 | xmlns:gml="http://www.opengis.net/gml/3.2" |
| 86 | xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 87 | <gml:identifier codeSpace="http://www.ietf.org/rfc/rfc3986"> |
| 88 | http://kahlua.eecs.jacobs-university.de:8080/def/crs/OGC/0/Index2D |
| 89 | </gml:identifier> |
| 90 | <parameters> |
| 91 | <parameter name="first-axis-label"> |
| 92 | <value>"i"</value> |
| 93 | <target>//gml:CartesianCS/gml:axis[1]/gml:CoordinateSystemAxis/gml:axisAbbrev</target> |
| 94 | </parameter> |
| 95 | <parameter name="second-axis-label"> |
| 96 | <value>"j"</value> |
| 97 | <target>//gml:CartesianCS/gml:axis[2]/gml:CoordinateSystemAxis/gml:axisAbbrev</target> |
| 98 | </parameter> |
| 99 | </parameters> |
| 100 | <targetCRS xlink:href="http://kahlua.eecs.jacobs-university.de:8080/def/crs/OGC/0/.Index2D-template"/> |
| 101 | </ParameterizedCRS> |
| 102 | }}} |
| 103 | |
| 104 | The content is sufficiently intuitive to understand that it provides two parameters -- `'first-axis-label'` and `'second-axis-label'` -- with defaults to `'i'` and `'j'`, respectively. |
| 105 | Thus if we want to use index CRSs but with the ''good old'' `x`/`y` labels, we need to set this URI as native reference system: [http://kahlua.eecs.jacobs-university.de:8080/def/crs/OGC/0/Index2D?first-axis-label=%22x%22&second-axis-label=%22y%22 http://kahlua.eecs.jacobs-university.de:8080/def/crs/OGC/0/Index2D?first-axis-label="x"&second-axis-label="y"]. |