Skip to content
This repository was archived by the owner on Dec 1, 2022. It is now read-only.
This repository was archived by the owner on Dec 1, 2022. It is now read-only.

Allow for polygons to be labelled #94

@jonblower

Description

@jonblower

In domains that use polygons (e.g. Polygon, PolygonSeries, MultiPolygon, MultiPolygonSeries), the polygons will often relate to well-known geographic regions, e.g. countries or administrative areas. It would be very useful if we could associate the polygons with labels (and perhaps unique IDs) to enable visualisation tools to display them. Maybe it would even be useful to associate polygons with arbitrary objects and properties.

Note that it would not be appropriate to make these labels a kind of range. This would technically work for (Multi)Polygons, but not for (Multi)PolygonSeries, as we would end up repeating the labels for each timestep.

One possible structure would look like this, adding a new property to the relevant domain types:

{
  "type": "Domain",
  "domainType": "MultiPolygonSeries",
  "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] ]  ],
        [ [ [200.0, 10.0], [201.0, 10.0], [201.0, 11.0], [200.0, 11.0], [200.0, 10.0] ] ]
      ]
    },
    "z": { "values": [2] },
    "t": { "values": ["2008-01-01T04:00:00Z", "2010-01-01T00:00:00Z"] }
  },
  "polygonProperties" : [
    { "id": "id_1", "label" : { "en" : "Berkshire" } },
    { "id": "id_2", "label" : { "en" : "Oxfordshire" } },
  ],
  "referencing": [...]
}

In this structure, the order of objects in the polygonProperties array matches the order in the values array of the polygon axis

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions