[Geojson] Nestability

phryk <phryk@commander1024.de> Sat, 22 December 2018 16:43 UTC

Return-Path: <phryk@commander1024.de>
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 43C3C12872C for <geojson@ietfa.amsl.com>; Sat, 22 Dec 2018 08:43:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=commander1024.de
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 Z_1LypySGxNY for <geojson@ietfa.amsl.com>; Sat, 22 Dec 2018 08:43:14 -0800 (PST)
Received: from triton.commander1024.de (triton.commander1024.de [176.9.247.82]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CB6CA127B4C for <geojson@ietf.org>; Sat, 22 Dec 2018 08:43:13 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by triton.commander1024.de (Postfix) with ESMTP id 718D5D246DA for <geojson@ietf.org>; Sat, 22 Dec 2018 17:43:10 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= commander1024.de; h=user-agent:content-transfer-encoding :content-disposition:content-type:content-type:mime-version :message-id:subject:subject:from:from:date:date:received :received; s=default; t=1545496989; x=1546101790; bh=SF3CoebWjc3 wAbEY3BKhBdJc1/RZdXoQRTJ75W6mIXk=; b=nmhDLhAzfDvDonYEDrwR62NjV3d Cp4WKJLw2cnof7VH1L/Fcy5GSDqjINIneX5j1zy1UpHzPo67ZPyJrMmSqgpeodtt l5M5LqePLCbK335J8zCw596k/pDf8ky591e4mVNJnqdRLs5sEozNGsW5VX5Dj3Rb M2VuetkdgU8XJ1MdLiZRaJGFolvQaYHgasGaWWIDfO6t0sLD/9PQj5M49dX2poGY /laQ0kohBD2RWAWu4i+2gluGBAtbRXIbZZvMHY6qobF/Ao4U+/bOwf6DjOG5Y2gO iFckXHr0LiXL4NYs97+98OQsZ6pvJXmmW4QtkGQOxITwXVcOI4g2ButoiyQ==
X-Virus-Scanned: Debian amavisd-new at Triton.commander1024.de
Received: from triton.commander1024.de ([127.0.0.1]) by localhost (triton.commander1024.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id UWRPujieQ_H9 for <geojson@ietf.org>; Sat, 22 Dec 2018 17:43:09 +0100 (CET)
Received: from aether.phryk (ip-88-153-140-200.hsi04.unitymediagroup.de [88.153.140.200]) (Authenticated sender: phryk@commander1024.de) by triton.commander1024.de (Postfix) with ESMTPSA for <geojson@ietf.org>; Sat, 22 Dec 2018 17:43:09 +0100 (CET)
Date: Sat, 22 Dec 2018 17:43:08 +0100
From: phryk <phryk@commander1024.de>
To: geojson@ietf.org
Message-ID: <20181222164308.GA53957@aether.phryk>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/geojson/K7j7Olp9Q1PGFF2rPPdCY5H6PEM>
Subject: [Geojson] Nestability
X-BeenThere: geojson@ietf.org
X-Mailman-Version: 2.1.29
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: Sat, 22 Dec 2018 16:43:16 -0000

So first off, let me say that I have no background in geoinformatics and am
coming to geojson from a kind of weird angle.

I'm writing a distinctly no-js webframework/cms with some fancy SVG
integration. One of the features I'm currently working on is better SVG
maps. I already implemented simple geojson->SVG rendering for
[Multi]Polygons and can render an arbitrarily bbox'd map.

Now that I'm this far, I stopped and thought a good deal about how I
want my data structured and have come to the conclusion that I want
nested Features in order to express hierarchical relations and attach
semantic info (via Feature's 'properties' dict), which I can then make
highlightable on the SVG map (again, without js) via CSS' :hover and
:target pseudoclasses.

Examples for data like that would be:
Nation > State > Municipality > District

or (for mapping military conflict)
Faction > Military Branch > Division > Regiment

When I reread the spec to make sure that's something I can do with geoJSON,
I noticed that it sadly isn't, as FeatureCollection does not count as Feature.

I also noticed that the spec recommends not to nest GeometryCollections,
even though nesting is valid for them.


This leaves me with three questions:

What's the reason for geoJSON to be so averse to nested data when much of
the world seems to be organized in a fashion that can be expressed very
well as a tree?

Is there a chance of the next version of geoJSON making
FeatureCollection count as Feature (and giving it the associated
'properties' key)?

Also, of course, I'm wondering if I'm just trying to saddle the wrong
pony here – is there maybe a nice simple spec that is a better fit for
what I'm trying to do and I'm simply not aware of it?


Best wishes,

    phryk