[Geojson] Position Clarification

Erik Seglem <erik.seglem@gmail.com> Tue, 02 August 2022 21:26 UTC

Return-Path: <erik.seglem@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 D62B4C14CF11 for <geojson@ietfa.amsl.com>; Tue, 2 Aug 2022 14:26:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z-qbHgE8WDXk for <geojson@ietfa.amsl.com>; Tue, 2 Aug 2022 14:26:43 -0700 (PDT)
Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 19172C14CF02 for <geojson@ietf.org>; Tue, 2 Aug 2022 14:26:43 -0700 (PDT)
Received: by mail-lf1-x133.google.com with SMTP id d14so11869563lfl.13 for <geojson@ietf.org>; Tue, 02 Aug 2022 14:26:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc; bh=Xait6Axq/Jx1lLgMuJVzt1Sa735rrxuL2ETJw2nGHZo=; b=LD5dT2Dg9i2IugtanunFvD5I/WiPgYskZJp5Ui8v1Tefye5NEwoq/n7Byfp2DIAOjO 4xsrRKB3c2nBKFUlZv+tZtMptPm9lc2ZtvnFlNA8senK8HegQg9+Jn2K/7R2ReW7ebwu +bSG4EqYGkxOZVEP9YGbYTktrKzBD6yUw2ZNl1csoDxsIMebqrKWWdF4rNXzLBpF7dS5 OGtCQzcxiOaksTbysCnB0/7dDGmee4WcqHW0U3IlBR485A2+p2FpvNT9T3uMvI5SJV5J E6xV4dlUmLAQnNjQXLnWP9bm9FRDkCfEyYiZsiOtYfS3FJwiJud/DyYUK2DIvz0VIA38 jjTg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc; bh=Xait6Axq/Jx1lLgMuJVzt1Sa735rrxuL2ETJw2nGHZo=; b=JVIoeByjAzQn+oJImGQiWLthqE3i6aGdzr/6GNlbbfzkR9LtQi0hHAIm+z33D2abNS SNQQ8joRD2ibgT442X8zfhhG1zNRf1vrJxqPzcepi+CujtelcvGYqiu6pMJb87BL7IDr ewulzlCJYiuf318Mofhex5Kc0Pflgk0exY3BOKwgV4f9gJ5G0XZrAqc0rzwTS5jE25t7 +IkRMF+Aj/1h9F4GLvzRmWevwraaVHHjY6/CaQLC2cJHzLmOuv7tl/LWvr19jzsmlvuV Pv+uRWUaY7xaBGAweU8ueNdkl8j0qekcDXF/sO/TExJtmNJXgzN0D7qPplUGpEQdRzn6 cydw==
X-Gm-Message-State: AJIora+6WreRFeCF5JA4w+QJ+BVoGphmLiTSyEKQ2xxuAaMwkF4jm7md 7ft9vi+bksb1bW/Up0LmL3rAmOQTmZf5e20Pptol3X1C
X-Google-Smtp-Source: AGRyM1s+ksAqKGD1S3+gg3t3bk7I25ZzAw16vbWYx4AO616Y9xzEaXe8zml5x0SAG+ibZdrKIamm8rjwPVazkFKXfqo=
X-Received: by 2002:ac2:57d2:0:b0:48a:ddab:8013 with SMTP id k18-20020ac257d2000000b0048addab8013mr7881111lfo.118.1659475600685; Tue, 02 Aug 2022 14:26:40 -0700 (PDT)
MIME-Version: 1.0
References: <CAPrYNak4-9QqecJpG19t39mCkq_0sxYBuWAvaTkb7epTJi_LCg@mail.gmail.com>
In-Reply-To: <CAPrYNak4-9QqecJpG19t39mCkq_0sxYBuWAvaTkb7epTJi_LCg@mail.gmail.com>
From: Erik Seglem <erik.seglem@gmail.com>
Date: Tue, 02 Aug 2022 17:26:10 -0400
Message-ID: <CAPrYNa=MtPzJGG9j-asR4iFrisWxzLLKcAmER7cdTg8g_zOH2A@mail.gmail.com>
To: geojson@ietf.org
Content-Type: multipart/alternative; boundary="000000000000b13fa705e548c554"
Archived-At: <https://mailarchive.ietf.org/arch/msg/geojson/B6N2iLvHxsBD-xTdSHp6Mpo0YVs>
Subject: [Geojson] Position Clarification
X-BeenThere: geojson@ietf.org
X-Mailman-Version: 2.1.39
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, 02 Aug 2022 21:26:46 -0000

I was looking over the spec and came across a bit that seems open to some
level of interpretation. In 3.1.1 it says "A position is an array of
numbers." And then goes on to specify the order and "using decimal numbers."

The JSON RFC says the fractional part of a "number" is optional. But, to
me, stating they are "decimal numbers" is an additional requirement on top
of a "number".

This seems to be backed up by the examples all having decimals in them, but
doesn't seem to be consistent across implementations across the community.
Some appear to allow integers, and some stick with floats.

In looking around for answers a Stack Exchange question came up with the
same question as mine:
https://gis.stackexchange.com/questions/429184/are-positions-without-decimals-valid-geojson
but
no definitive answer either. I figured the best thing to do would be ask
this group.

I guess it comes down to is this a valid GeoJSON Point?
     {
         "type": "Point",
         "coordinates": *[100, 0]*
     }

If in fact they do require a decimal place. Does that also apply to the
elevation or just the long / lat? It seems to only say the first two
elements must be decimal numbers, and the third is optional without that
clarification.

Would this be valid?
     {
         "type": "Point",
         "coordinates": [100.0, 0.0, *124*]
     }

And what about bounding boxes? The spec says it's an array and specifies
the length, but not the type of the values.

Would this be valid?
   {
       "type": "Feature",
       "bbox": *[-10, -10, 10, 10]*,
       "geometry": {
           "type": "Polygon",
           "coordinates": [
               [
                   [-10.0, -10.0],
                   [10.0, -10.0],
                   [10.0, 10.0],
                   [-10.0, -10.0]
               ]
           ]
       }
       //...
   }

Thanks,
Erik