Skip to content
189 changes: 178 additions & 11 deletions standard/clause_specification_text.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1624,15 +1624,15 @@ Coverage example:
//### 11.9. Polygon
==== Polygon

Polygons in this domain domain type are defined equally to GeoJSON, except that they can only contain `[x,y]` positions (and not `z` or additional coordinates):
Polygons in this domain type are defined equivalent to GeoJSON, except that they can only contain `[x,y]` positions (and not `z` or additional coordinates):
- A LinearRing is an array of 4 or more `[x,y]` arrays where each of `x` and `y` is a coordinate value. The first and last `[x,y]` elements are identical.
- A Polygon is an array of LinearRing arrays. For Polygons with multiple rings, the first MUST be the exterior ring and any others MUST be interior rings or holes.

- A domain with Polygon domain type MUST have the axis `"composite"` which has a single Polygon value.
- The axis `"composite"` MUST have the data type `"polygon"` and the coordinate identifiers `"x","y"`, in that order.
- A Polygon domain MAY have the axes `"z"` and `"t"` which both MUST have a single coordinate value only.

Domain example:
Domain example of a simple Polygon:

[%unnumbered%]
```json
Expand All @@ -1654,7 +1654,7 @@ Domain example:
}
```

Coverage example:
Coverage example of a simple Polygon:

[%unnumbered%]
```json
Expand Down Expand Up @@ -1689,6 +1689,67 @@ Coverage example:
}
```

Domain example of a Polygon with two holes, one square, the other triangular:

[%unnumbered%]
```json
{
"type": "Domain",
"domainType": "Polygon",
"axes": {
"composite": {
"dataType": "polygon",
"coordinates": ["x","y"],
"values": [
[ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
[ [100.3, 0.2], [100.3, 0.4], [100.5, 0.4], [100.5, 0.2], [100.3, 0.2] ]
[ [100.7, 0.6], [100.8, 0.8], [100.9, 0.6], [100.7, 0.6] ] ]
]
},
"z": { "values": [2] },
"t": { "values": ["2008-01-01T04:00:00Z"] }
},
"referencing": [...]
}
```

Coverage example of a Polygon with two holes, one square, the other triangular:

[%unnumbered%]
```json
{
"type" : "Coverage",
"domain" : {
"type": "Domain",
"domainType": "Polygon",
"axes": {
"composite": {
"dataType": "polygon",
"coordinates": ["x","y"],
"values": [
[ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
[ [100.3, 0.2], [100.3, 0.4], [100.5, 0.4], [100.5, 0.2], [100.3, 0.2] ]
[ [100.7, 0.6], [100.8, 0.8], [100.9, 0.6], [100.7, 0.6] ] ]
]
},
"z": { "values": [2] },
"t": { "values": ["2008-01-01T04:00:00Z"] }
},
"referencing": [...]
},
"parameters" : {
"temperature": {...}
},
"ranges" : {
"temperature" : {
"type" : "NdArray",
"dataType": "float",
"values" : [273.15]
}
}
}
```

[[polygonseries]]
//### 11.10. PolygonSeries
==== PolygonSeries
Expand All @@ -1697,7 +1758,7 @@ Coverage example:
- A domain with PolygonSeries domain type MAY have the axis `"z"` which MUST have a single coordinate value only.
- The axis `"composite"` MUST have the data type `"polygon"` and the coordinate identifiers `"x","y"`, in that order.

Domain example:
Domain example of a PolygonSeries:

[%unnumbered%]
```json
Expand All @@ -1713,13 +1774,13 @@ Domain example:
]
},
"z": { "values": [2] },
"t": { "values": ["2008-01-01T04:00:00Z","2008-01-01T05:00:00Z"] }
"t": { "values": ["2008-01-01T04:00:00Z","2008-01-01T05:00:00Z","2008-01-01T06:00:00Z] }
},
"referencing": [...]
}
```

Coverage example:
Coverage example of a PolygonSeries:

[%unnumbered%]
```json
Expand All @@ -1737,7 +1798,7 @@ Coverage example:
]
},
"z": { "values": [2] },
"t": { "values": ["2008-01-01T04:00:00Z","2008-01-01T05:00:00Z"] }
"t": { "values": ["2008-01-01T04:00:00Z","2008-01-01T05:00:00Z","2008-01-01T05:00:00Z] }
},
"referencing": [...]
},
Expand All @@ -1749,7 +1810,7 @@ Coverage example:
"type" : "NdArray",
"dataType": "float",
"axisNames": ["t"],
"shape": [2],
"shape": [3],
"values" : [...]
}
}
Expand All @@ -1763,8 +1824,9 @@ Coverage example:
- A domain with MultiPolygon domain type MUST have the axis `"composite"` where the values are Polygons. Polygons are defined in the Polygon domain type.
- The axis `"composite"` MUST have the data type `"polygon"` and the coordinate identifiers `"x","y"`, in that order.
- A MultiPolygon domain MAY have the axes `"z"` and `"t"` which both MUST have a single coordinate value only.
- A MultiPolygon uses multiple polygons to represent non-contiguous regions, which are collectively treated as a single coverage domain, with a single associated range value. For example the MultiPolygon could represent the individual islands within a country, associated with the total population of that country.

Domain example:
Domain example of a MultiPolygon:

[%unnumbered%]
```json
Expand All @@ -1787,7 +1849,7 @@ Domain example:
}
```

Coverage example:
Coverage example of a MultiPolygon:

[%unnumbered%]
```json
Expand Down Expand Up @@ -1825,6 +1887,111 @@ Coverage example:
}
```

Domain example of a MultiPolygon where one polygon has a hole:

[%unnumbered%]
```json
{
"type": "Coverage",
"domain": {
"type": "Domain",
"domainType": "MultiPolygon",
"axes": {
"composite": {
"dataType": "polygon",
"coordinates": ["x", "y"],
"values": [
[
[
[40, 40],
[20, 45],
[45, 30],
[40, 40]
]
],
[
[
[20, 35],
[10, 30],
[10, 10],
[30, 5],
[45, 20],
[20, 35]
],
[
[30, 20],
[20, 15],
[20, 25],
[30, 20]
]
]
]
},
"z": {
"values": [2]
},
"t": {
"values": ["2008-01-01T04:00:00Z"]
}
},
"referencing": [...]
},
"parameters": {
},
"ranges": {
"temperature": {
"type": "NdArray",
"dataType": "float",
"axisNames": ["composite"],
"shape": [2],
"values": [23.1, 24.7]
}
}
}
```

Coverage example of a MultiPolygon where one of the Polygons has a hole.

[%unnumbered%]
```json
{
"type": "Coverage",
"domain": {
"type": "Domain",
"domainType": "MultiPolygon",
"axes": {
"composite": {
"dataType": "polygon",
"coordinates": ["x", "y"],
"values": [
[[[40, 40],[20, 45],[45, 30],[40, 40]]],
[[[20, 35],[10, 30],[10, 10],[30, 5],[45, 20],[20, 35]],
[[30, 20],[20, 15],[20, 25],[30, 20]]
]
},
"z": {
"values": [2]
},
"t": {
"values": ["2008-01-01T04:00:00Z"]
}
},
"referencing": [...]
},
"parameters": {
},
"ranges": {
"temperature": {
"type": "NdArray",
"dataType": "float",
"axisNames": ["composite"],
"shape": [2],
"values": [23.1, 24.7]
}
}
}
```

[[multipolygonseries]]
//### 11.12. MultiPolygonSeries
==== MultiPolygonSeries
Expand All @@ -1850,7 +2017,7 @@ Domain example:
]
},
"z": { "values": [2] },
"t": { "values": ["2008-01-01T04:00:00Z", "2010-01-01T00:00:00Z"] }
"t": { "values": ["2008-01-01T00:00:00Z", "2010-01-01T00:00:00Z", "2012-01-01T00:00:00Z"] }
},
"referencing": [...]
}
Expand Down
Loading