Subject: [Geojson] Question regarding RFC 7946: Interior and Exterior Linear Rings

From: Chris Goodman <[email-masked]>
Date: Tue, 23 May 2017 07:19:06 +0000

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.

Q1. If an interior linear ring (hole) is not completely inside the exterior ring (border) of a polygon, is it an illegal polygon?

GeoJson.io allows such an interior ring to be imported. Perhaps it is a bug.

Q2. If the interior ring is not clockwise, then what is the expected behaviour of the polygon?

Q3. Should 'interior linear ring' and 'exterior linear ring' be formally defined in the RFC?

Q4. If two interior linear rings overlap, then is the result the union of the two holes?

Regards, Chris
Chris Goodman
Supervising Consultant
M:  +61 419 482 620
Office:  +61 3 8615 4500
Web: www.objectconsulting.com.au
Email: [email-masked]<mailto:[email-masked]>

---

From: Sean Gillies <[email-masked]>
Date: Tue, 23 May 2017 12:16:22 +0200

Hi Chris,

On Tue, May 23, 2017 at 9:19 AM, Chris Goodman <
[email-masked]> wrote:

> Q1. If an interior linear ring (hole) is not completely inside the
> exterior ring (border) of a polygon, is it an illegal polygon?
>

> GeoJson.io allows such an interior ring to be imported. Perhaps it is a

It would be invalid from an OGC simple features perspective but is not
invalid GeoJSON.

> behaviour of the polygon?

The same.

>
>
> Q3. Should ‘interior linear ring’ and ‘exterior linear ring’ be formally
> defined in the RFC?
>

The WG didn't find this necessary. Are you saying it would improve the
spec? How so?

> Q4. If two interior linear rings overlap, then is the result the union of

Geometric operations are outside the scope of the GeoJSON. The format only
describes a serialization for polygons. Exterior ring comes first, interior
rings follow.

>From a OGC simple features perspective a polygon with overlapping holes is
invalid, but I've found that GIS software often has fault-tolerant modes
that can deal with these kinds of invalid shapes. PostGIS's buffer(0.0),
for example, which I expect would indeed replace the overlapping holes with
a single hole that is their union, and not create any "anti-holes" or new
positive areas.

-- 
Sean Gillies

---

From: Carl Reed <[email-masked]>
Date: Tue, 23 May 2017 07:33:33 -0600

Chris -

With regard to

Q1. If an interior linear ring (hole) is not completely inside the exterior
ring (border) of a polygon, is it an illegal polygon?

Whether an encoding allows this case of not, decades of GIS best practice
suggests validation software should throw an error and state that an
interior ring that crosses the exterior ring is invalid.

Regards

Carl Reed, PhD

On Tue, May 23, 2017 at 4:16 AM, Sean Gillies <[email-masked]>
wrote:

> Hi Chris,
>
> On Tue, May 23, 2017 at 9:19 AM, Chris Goodman <Chris.Goodman@
> objectconsulting.com.au> wrote:
>
> _______________________________________________
> GeoJSON mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/geojson
>
>

-- 
Carl Reed, PhD
Carl Reed and Associates

Mobile: 970-402-0284

“Our liberty depends on the freedom of the press, and that cannot be
limited without being lost.”

— Thomas Jefferson, U.S. Founding Father