Skip to content

Update clause_specification_text.adoc#214

Open
chris-little wants to merge 3 commits intomasterfrom
chris-little-more-polygon-examples
Open

Update clause_specification_text.adoc#214
chris-little wants to merge 3 commits intomasterfrom
chris-little-more-polygon-examples

Conversation

@chris-little
Copy link
Copy Markdown
Contributor

@chris-little chris-little commented Mar 25, 2026

Added example of a polygon with holes
Added text clarifying use of MultiPolygon and improved examples
Minor text edits

Added clarifying text and improved examples for MultiPolygon domain
@chris-little chris-little requested a review from jonblower March 25, 2026 22:42
Copy link
Copy Markdown

@awarde96 awarde96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good and clarifies the multiPolygon, maybe to be more explicit we could add the range for the Polygon example with holes that there is only a single value in the range? Not fully needed but maybe helps people understand it is a single polygon.

{
  "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]
    }
  }
}

I would also add an explicit example of MultiPolygon where one of the Polygons has a hole.

{
  "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]
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants