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

Carl Reed <carl.n.reed@gmail.com> Tue, 23 May 2017 13:33 UTC

Return-Path: <carl.n.reed@gmail.com>
X-Original-To: geojson@ietfa.amsl.com
Delivered-To: geojson@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DCBAF129527 for <geojson@ietfa.amsl.com>; Tue, 23 May 2017 06:33:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KqOObfyH28Kf for <geojson@ietfa.amsl.com>; Tue, 23 May 2017 06:33:37 -0700 (PDT)
Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B1963129B16 for <geojson@ietf.org>; Tue, 23 May 2017 06:33:35 -0700 (PDT)
Received: by mail-lf0-x230.google.com with SMTP id 99so48752074lfu.1 for <geojson@ietf.org>; Tue, 23 May 2017 06:33:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wk/5zIPC6OTaqGoQgXKGWouu8RXO1o7K8y2ZEuJblJ0=; b=JTkdeegUPluMXd2ej4Uah8hplqQjsAQ3urk3mXqIfcoz193LAjq8KulndvChpPi7Ww OcL/dWAlJCeNDhNDRcVJi8JfBze6limrte7a7viz/HH7mcfOewE+3+hcFUdMLSZV036m 5vMg5Wg8tFkMW97Nwvh5zGHC1VPgCc5r7yfM8oZauw9WJVZua5qg3tvVz1FJHc9BuT/d pxYcHYub09CEcfOcyguJjt2XBs0JGGdxcmOvN432bOksvCAZ16kz2Cp6lY1cPj/Lz1ab PbCM4ZMILjQQk0vRoga84XrgiiIe5j7wRwhe7DY1M88D+OGQZf3fjQayzTe+U09qCUiy dEkQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wk/5zIPC6OTaqGoQgXKGWouu8RXO1o7K8y2ZEuJblJ0=; b=F5cSz9B8TeuaZIrYO7qY8KzflwWXBmrPDS5v4yOrpAsgWYqLaCwmFTsqb532wSdxKk C27/Z71/Lh3EcYBcQNgSoaCRTuHlKKk+PR+SOYMus1P3HRBJEz0HA8AOZO7lwCNxF36L aCtRX7G+XgLuTheJfGsXCy26gogDzX7CqjbjMwasxWJOPejRUc+iBKhrFoLXh2OMPRTz FcIS13vHkO7AJMvqvXM/66Sof2mnrzyZo5FBtTPe27c07EH4+NBjA701K2Of3mMEp5/J rM4dORejibngEj7d2TqKb2zxlqDHNhXr30u9oOK0K6A2pDlShT91QmHsxijsy4N+I46x dObg==
X-Gm-Message-State: AODbwcAfNbDJCalVOkIoYIcicPsAF+1refKVdEXZ8ZGNAg6LGuNuCugy C3hroBrR49nSyrHHPPFrHeq/twFalw==
X-Received: by 10.46.22.86 with SMTP id 22mr8372478ljw.126.1495546414025; Tue, 23 May 2017 06:33:34 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.46.1.81 with HTTP; Tue, 23 May 2017 06:33:33 -0700 (PDT)
In-Reply-To: <CAOodmJp6g_HWBaz53ZkWnA8QLPg1eFSbknV6S7=mDqo79YsZbQ@mail.gmail.com>
References: <PS1PR06MB1241E7092910654915B99732AAF90@PS1PR06MB1241.apcprd06.prod.outlook.com> <CAOodmJp6g_HWBaz53ZkWnA8QLPg1eFSbknV6S7=mDqo79YsZbQ@mail.gmail.com>
From: Carl Reed <carl.n.reed@gmail.com>
Date: Tue, 23 May 2017 07:33:33 -0600
Message-ID: <CAJcQiLfytmPEysA88zpLRj4tp_GbES9UZ+Uf22D+xMnhmwc60g@mail.gmail.com>
To: Sean Gillies <sean.gillies@gmail.com>
Cc: Chris Goodman <Chris.Goodman@objectconsulting.com.au>, "geojson@ietf.org" <geojson@ietf.org>
Content-Type: multipart/alternative; boundary="f403045fb462c0d5ed05503108de"
Archived-At: <https://mailarchive.ietf.org/arch/msg/geojson/BXgJGOkz8q9ar-xmoB7zX4DwImQ>
Subject: Re: [Geojson] Question regarding RFC 7946: Interior and Exterior Linear Rings
X-BeenThere: geojson@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: IETF GeoJSON WG <geojson.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/geojson>, <mailto:geojson-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/geojson/>
List-Post: <mailto:geojson@ietf.org>
List-Help: <mailto:geojson-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/geojson>, <mailto:geojson-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 23 May 2017 13:33:39 -0000

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 <sean.gillies@gmail.com>
wrote:

> Hi Chris,
>
> On Tue, May 23, 2017 at 9:19 AM, Chris Goodman <Chris.Goodman@
> objectconsulting.com.au> wrote:
>
>> 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.
>>
>
> It would be invalid from an OGC simple features perspective but is not
> invalid GeoJSON.
>
>
>>
>>
>> Q2. If the interior ring is not clockwise, then what is the expected
>> 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
>> the two holes?
>>
>
> 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
>
> _______________________________________________
> GeoJSON mailing list
> GeoJSON@ietf.org
> 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