Ancestors

Written by Jeremia Kimelman on 2025-01-22 at 19:44

Nerdy #GIS post but anybody know why would I ever want a GeometryCollection over a FeatureCollection in a GeoJSON file? Seems to break a number of tools like QGIS and tippecanoe

=> More informations about this toot | More toots from jeremiak@journa.host

Toot

Written by ryan on 2025-01-22 at 20:20

@jeremiak Despite both having *Collection in their names they are not equivalent in terms of hierarchy! GeometryCollection is a Geometry object just like Point, Polygon, etc.

So a Feature object's geometry member could be a GeometryCollection, and that Feature object could appear in the features array of FeatureCollection.

But what really makes them awkward is how unlike the other Geometry objects it doesn't support coordinates as a member, it uses geometries. 🫠

=> More informations about this toot | More toots from ryan@social.lol

Descendants

Written by ryan on 2025-01-22 at 20:20

So I'd guess tooling weirdness is caused by a combination of two factors — people are using them wrong and treating them like an alternative to FeatureCollection, and because they are the only Geometry that doesn't support coordinates it's not always accounted for.

FWIW the spec does basically say "maybe don't use this" so I think you have the right read on it! https://datatracker.ietf.org/doc/html/rfc7946#appendix-B.2

Here's the spec section on GeometryCollection itself too: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.8

=> More informations about this toot | More toots from ryan@social.lol

Written by Jeremia Kimelman on 2025-01-22 at 21:49

@ryan Thanks Ryan! That does help and explain things a bit. In this case the GeoJSON file is the output file of using mapshaper to convert and reproject a Shapefile but I just changed it to a feature collection instead and that seems to have done the trick.

Man, one of the crazy things about geo programming is that there's very rarely a midpoint - it's either wrong and therefore completely broken (aka doesn't show up on a map) or it's correct

=> More informations about this toot | More toots from jeremiak@journa.host

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113873860500754586
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
265.631967 milliseconds
Gemini-to-HTML Time
0.817674 milliseconds

This content has been proxied by September (ba2dc).