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: custom-types.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ CoverageJSON has several extension points where it allows you to use a custom *t
4
4
In the following we walk through each of those extension points using simple examples.
5
5
At the end you should feel comfortable inventing your own types.
6
6
7
-
As for custom fields (see previous page), if you don't care much about interoperability or type name clashes with future versions of the format, then the easiest way to use custom types is to use a new simple name (e.g. replacing "Grid" by "MyGrid").
7
+
As for custom fields (see previous page), if you don't care much about interoperability or type name clashes with future versions of the format, then the easiest way to use custom types is to use a new simple name (e.g. replacing `"Grid"` by `"MyGrid"`).
8
8
This is fine if you don't intend to share your data more widely and you have control over all clients that make use of the data.
9
9
10
10
In the following we focus on how to use custom types in a future-proof and interoperable way.
@@ -14,7 +14,7 @@ The CoverageJSON specification will never define a type with `"prefix:suffix"` f
14
14
In order to establish a common understanding of extensions and to be able to easily combine them in one document, prefixes should be registered.
15
15
Registration is not bound to any restrictions or obligations. The site <https://covjson.org/prefixes/> shows already registered prefixes and has instructions on how to add a new one (which amounts to a simple GitHub pull request).
16
16
17
-
If you're into linked data and RDF, then consider having a look at the [JSON-LD section](http://covjson.org/spec/#json-ld) of the spec.
17
+
If you're into linked data and RDF, then consider having a look at the [JSON-LD section](https://covjson.org/spec/#json-ld) of the spec.
18
18
19
19
## Custom domain type
20
20
@@ -48,7 +48,7 @@ Example:
48
48
}
49
49
```
50
50
51
-
Instead of the compact URI `uor:Transect` we could also have used an absolute URI, like `http://example.com/covjson-Transect`. This can make sense if there is no namespace as such and the concept is not part of a set of concepts. Publishers should decide for one variant and then stick to it -- this makes client development easier.
51
+
Instead of the compact URI `uor:Transect` we could also have used an absolute URI, like `http://example.com/covjson-Transect`. This can make sense if there is no namespace as such and the concept is not part of a set of concepts. Publishers should decide for one variant and then stick to it - this makes client development easier.
52
52
53
53
## Custom axis value data type
54
54
@@ -82,8 +82,8 @@ Example:
82
82
}
83
83
```
84
84
85
-
Here, `uor:multiPolygon` defines that each axis values is a GeoJSON MultiPolygon (the `"coordinates"` of it).
86
-
Instead of the compact URI `uor:multiPolygon` we could also have used an absolute URI, like `http://example.com/covjson-multiPolygon`. This can make sense if there is no namespace as such and the concept is not part of a set of concepts. Publishers should decide for one variant and then stick to it -- this makes client development easier.
85
+
Here, `uor:multiPolygon` defines that each axis value is a GeoJSON MultiPolygon (the `"coordinates"` field of it).
86
+
Instead of the compact URI `uor:multiPolygon` we could also have used an absolute URI, like `http://example.com/covjson-multiPolygon`. This can make sense if there is no namespace as such and the concept is not part of a set of concepts. Publishers should decide for one variant and then stick to it - this makes client development easier.
87
87
88
88
## Custom reference system type
89
89
@@ -111,7 +111,7 @@ Example:
111
111
112
112
In the example above, `uor:HEALPixRS` refers to [HEALPix](http://healpix.jpl.nasa.gov/) which is a type of [geodesic discrete global grid system](https://en.wikipedia.org/wiki/Discrete_Global_Grid) (sometimes just called geodesic grid). Different to longitude/latitude or projected systems, grid cell indexing works in a 1D space. Also note that three additional custom fields are used to fully define the reference system.
113
113
114
-
Instead of the compact URI `uor:HEALPixRS` we could also have used an absolute URI, like `http://example.com/healpix`. This can make sense if there is no namespace as such and the concept is not part of a set of concepts. Publishers should decide for one variant and then stick to it -- this makes client development easier.
114
+
Instead of the compact URI `uor:HEALPixRS` we could also have used an absolute URI, like `http://example.com/healpix`. This can make sense if there is no namespace as such and the concept is not part of a set of concepts. Publishers should decide for one variant and then stick to it - this makes client development easier.
115
115
116
116
## Custom unit symbol type
117
117
@@ -141,7 +141,7 @@ Example:
141
141
142
142
Here, `uor:UDUNITS` refers to the coding scheme of the [UDUNITS](http://www.unidata.ucar.edu/software/udunits/) software package. This scheme is also the official one used by the popular [CF Conventions](http://cfconventions.org/).
143
143
144
-
Instead of the compact URI `uor:UDUNITS` we could also have used an absolute URI, like `http://example.com/udunits`. This can make sense if there is no namespace as such and the concept is not part of a set of concepts. Publishers should decide for one variant and then stick to it -- this makes client development easier.
144
+
Instead of the compact URI `uor:UDUNITS` we could also have used an absolute URI, like `http://example.com/udunits`. This can make sense if there is no namespace as such and the concept is not part of a set of concepts. Publishers should decide for one variant and then stick to it - this makes client development easier.
145
145
146
146
## Custom range type (or: Custom type in custom fields)
147
147
@@ -177,7 +177,7 @@ Example:
177
177
"axisNames": ["y","x"],
178
178
"shape": [180, 360],
179
179
"uor:channel": 0,
180
-
"url": "http://example.com/data.tiff"
180
+
"uor:url": "http://example.com/data.tiff"
181
181
}
182
182
}
183
183
}
@@ -187,4 +187,4 @@ Example:
187
187
In the example above, two alternative range encodings are provided, one based on a [DAP 2](http://opendap.org/documentation) endpoint, the other on TIFF images.
188
188
The `uor:dap` and `uor:tiff` fields provide a convenient entry point to the alternative encodings. Within those custom fields, the `uor:DAP2NdArray` and `uor:TIFF2DArray` types define the actual range type, of which there may be more than one for a given entry point (similar to the built-in `NdArray` and `TiledNdArray` types).
189
189
190
-
Instead of the compact URIs `uor:DAP2NdArray` and `uor:TIFF2DArray` we could also have used absolute URIs, like `http://example.com/covjson-DAP2NdArray`. This can make sense if there is no namespace as such and the concept is not part of a set of concepts. Publishers should decide for one variant and then stick to it -- this makes client development easier. In the examples above, compact URIs make more sense though, as there are custom fields which likely would belong to the same namespace.
190
+
Instead of the compact URIs `uor:DAP2NdArray` and `uor:TIFF2DArray` we could also have used absolute URIs, like `http://example.com/covjson-DAP2NdArray`. This can make sense if there is no namespace as such and the concept is not part of a set of concepts. Publishers should decide for one variant and then stick to it - this makes client development easier. In the examples above, compact URIs make more sense though, as there are custom fields which likely would belong to the same namespace.
0 commit comments