Subject: [Geojson] Question regarding RFC 7946

From: Andrew Harvey <[email-masked]>
Date: Mon, 12 Mar 2018 22:31:00 +1100

The spec says:

> For Polygons with more than one of these rings, the first MUST be the
> exterior ring, and any others MUST be interior rings. The exterior
> ring bounds the surface, and the interior rings (if present) bound
> holes within the surface
So does that mean that a Polygon geometry which has two interior rings
where one falls inside another shouldn't create an island within a hole
rather the smaller interior ring contained by the larger one becomes
nullified?
That is, the rendering we see at
https://gist.github.com/andrewharvey/c092a6c4932a4d94ecb6cd59dc935b90 is
wrong and it shouldn't show an island in the middle?
This arose when thinking about
https://github.com/Turfjs/turf/issues/1305
Many thanks,
--
Andrew Harvey
CEO
*Alantgeo*

www.alantgeo.com.au
https://au.linkedin.com/in/andrewharveyau
@alantgeo[1]

Links:

  1. https://twitter.com/alantgeo

---

From: Martin Daly <[email-masked]>
Date: Mon, 12 Mar 2018 13:20:04 +0000

Andrew,

This is for consistency with OGC Simple Features which expects 1 exterior + 0->N holes in a Polygon.

The geometry you describe is represented as a MultiPolygon in SF. See Figure 17 in the standard: http://portal.opengeospatial.org/files/?artifact_id=25355

Implementations may choose to be more flexible, of course.

Martin

From: GeoJSON <[email-masked]> On Behalf Of Andrew Harvey
Sent: 12 March 2018 11:31
To: [email-masked]
Subject: [Geojson] Question regarding RFC 7946

The spec says:

For Polygons with more than one of these rings, the first MUST be the exterior ring, and any others MUST be interior rings. The exterior ring bounds the surface, and the interior rings (if present) bound holes within the surface

So does that mean that a Polygon geometry which has two interior rings where one falls inside another shouldn't create an island within a hole rather the smaller interior ring contained by the larger one becomes nullified?

That is, the rendering we see at https://gist.github.com/andrewharvey/c092a6c4932a4d94ecb6cd59dc935b90 is wrong and it shouldn't show an island in the middle?

This arose when thinking about https://github.com/Turfjs/turf/issues/1305

Many thanks,
--
Andrew Harvey
CEO
Alantgeo

www.alantgeo.com.au<http://www.alantgeo.com.au>
https://au.linkedin.com/in/andrewharveyau
@alantgeo<https://twitter.com/alantgeo>

---

From: Andrew Harvey <[email-masked]>
Date: Wed, 14 Mar 2018 10:14:22 +1100

Thank you Martin for clarifying this.

> This is for consistency with OGC Simple Features which expects 1
> exterior + 0->N holes in a Polygon.>  

> The geometry you describe is represented as a MultiPolygon in SF. See
> Figure 17 in the standard:
> http://portal.opengeospatial.org/files/?artifact_id=25355>  

> *From:* GeoJSON <[email-masked]> *On Behalf Of *Andrew
> Harvey *Sent:* 12 March 2018 11:31 *To:* [email-masked] *Subject:*
> [Geojson] Question regarding RFC 7946>  

>> holes within the surface>  

> where one falls inside another shouldn't create an island within a
> hole rather the smaller interior ring contained by the larger one
> becomes nullified?>  

> https://gist.github.com/andrewharvey/c092a6c4932a4d94ecb6cd59dc935b90
> is wrong and it shouldn't show an island in the middle?>  

> https://github.com/Turfjs/turf/issues/1305>  

Links: