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
{{ message }}
Repository navigation
Clarification on MultiPolygon, MultiPolygonSeries, and possibly MultiPoint Coverages #202
According to the Covjson Playground, each polygon in a MultiPolygon has a different associated value in linked ranges. For instance, in the first Polygon value, the temperature value is different from the subsequent polygon value.
Wouldn't it make sense that geographic features represented by a MultiPolygon have the same associated value?
This is a good point, and I think you have found an inconsistency. The Polygon domain type is defined as having a single polygon to define its domain, but there are two possible meanings of "MultiPolygon":
A single domain element that is made up of multiple discontiguous polygons (like the land area of the USA)
A domain that contains a number of polygons, each of which has its own range value.
The CovJSON spec is not completely clear, but implies that the second one is correct (because the length of the range in the example is the same as the length of the z axis, implying that the polygons are considered part of the same domain element).
But, as you say, the Playground treats the polygons as different domain elements in the MultiPolygon example.
Assuming that the spec is the source of truth, this means:
The playground example should be corrected, and
We probably need a way to accommodate the second use case above
I understand the implication. Given the spec also uses the first meaning, then I think it would make sense to use the first meaning until the alternate case is accomodated
Yes, I agree. The second use case could be accommodated through a CoverageCollection (like the example of the Point Collection in the Playground).
As the title of this issue suggests, I think we may also have an issue with the MultiPoint domain type. We probably need to check what the schema and validator tools do too.
Having gone through the JSON Schema and realizing that the shape is derived directly from length of axis, it would make sense to maintain the schema as is for compatibility issues. An attempt to be backward compatible could mean duplication of values
@murithigeo@jonblower Having read the spec, and the CovJson playground, I am not sure what we have agreed.
In my mind, a MultiPolygon is more fundamental thing than a Polygon. Operate on a Polygon, such as by clipping, and you may end up with a MultiPolygon. Operate on a MultiPolygon, such as by clipping, and you end up with a MultiPolygon, or even a Polygon, which is a special case of MultiPolygon. So I prefer that a MultiPolygon is a spatially discontinuous representation of an single underlying entity, rather than a short-hand way of representing several different unconnected Polygons.
Do you agree with my interpretation?
Example 2: Two discrete polygons in a multiPolygon however one of the discrete polygons contains a hole represented by two polygons, where each is assigned a value in the range so 2 values appear in the range.
Example 3: One discrete polygon which contains multiple polygons to denote a polygon with a hole, so only a single value is assigned in the range. Although this example could arguably just be a polygon rather than a multiPolygon.
The extra examples have now been added with PR #214, with the agreed semantic that a MultiPolygon is used to indicate a discontinuous domain of one value.
Activity
jonblower commentedon Jul 21, 2025
This is a good point, and I think you have found an inconsistency. The Polygon domain type is defined as having a single polygon to define its domain, but there are two possible meanings of "MultiPolygon":
The CovJSON spec is not completely clear, but implies that the second one is correct (because the length of the range in the example is the same as the length of the
zaxis, implying that the polygons are considered part of the same domain element).But, as you say, the Playground treats the polygons as different domain elements in the MultiPolygon example.
Assuming that the spec is the source of truth, this means:
@murithigeo does the above make sense to you?
murithigeo commentedon Jul 22, 2025
I understand the implication. Given the spec also uses the first meaning, then I think it would make sense to use the first meaning until the alternate case is accomodated
jonblower commentedon Jul 22, 2025
Yes, I agree. The second use case could be accommodated through a CoverageCollection (like the example of the Point Collection in the Playground).
As the title of this issue suggests, I think we may also have an issue with the MultiPoint domain type. We probably need to check what the schema and validator tools do too.
I'm labelling this for the next bugfix release
chris-little commentedon Dec 3, 2025
@jonblower @murithigeo I am happy with the above analysis. Are there any volunteers for fixing:
chris-little commentedon Jan 28, 2026
We need to cross check the semantics of using MultiPolygon etc in API-EDR and perhaps also API-Coverages or CIS.
murithigeo commentedon Jan 29, 2026
If I remember correctly, doesn't OGC API-EDR use the current official schemas instead of their own? This may make the semantics easier to change
murithigeo commentedon Mar 2, 2026
Having gone through the JSON Schema and realizing that the shape is derived directly from length of axis, it would make sense to maintain the schema as is for compatibility issues. An attempt to be backward compatible could mean duplication of values
chris-little commentedon Mar 25, 2026
@murithigeo @jonblower Having read the spec, and the CovJson playground, I am not sure what we have agreed.
In my mind, a MultiPolygon is more fundamental thing than a Polygon. Operate on a Polygon, such as by clipping, and you may end up with a MultiPolygon. Operate on a MultiPolygon, such as by clipping, and you end up with a MultiPolygon, or even a Polygon, which is a special case of MultiPolygon. So I prefer that a MultiPolygon is a spatially discontinuous representation of an single underlying entity, rather than a short-hand way of representing several different unconnected Polygons.
Do you agree with my interpretation?
murithigeo commentedon Mar 25, 2026
Yes, that makes sense.
I think this issue can be closed
chris-little commentedon Mar 25, 2026
@murithigeo Agreed, but we need some more examples to clarify the distinctions.
awarde96 commentedon Mar 26, 2026
Hey @chris-little , I tried to do a few examples based on what we discussed in the community group meeting.
Example 1: Two discrete polygons in a multiPolygon where each is assigned a value in the range so 2 values appear in the range.
Example 2: Two discrete polygons in a multiPolygon however one of the discrete polygons contains a hole represented by two polygons, where each is assigned a value in the range so 2 values appear in the range.
Example 3: One discrete polygon which contains multiple polygons to denote a polygon with a hole, so only a single value is assigned in the range. Although this example could arguably just be a polygon rather than a multiPolygon.
These are based on the examples found here https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry under multiPolygon for a visual aid.
Do these make sense and clarify things?
chris-little commentedon Apr 2, 2026
@awarde96 Have a look at PR#214.
chris-little commentedon May 12, 2026
The extra examples have now been added with PR #214, with the agreed semantic that a MultiPolygon is used to indicate a discontinuous domain of one value.