Feature request: FlatGeobuf input
https://github.com/flatgeobuf/flatgeobuf is an alternative to both Geobuf and GeoJSON.
Advantage over Geobuf:
- supported directly by GDAL 3.1+
- less work (no deserialization step)
Advantage over GeoJSON:
- less work, possibly faster, but may not ultimately be a bottleneck
Other advantages:
- Can read an indexed FlatGeobuf to only grab a subset of data, but this would need an API.
Tippecanoe should be able to read a stream of flatgeobuf either from disk or from a pipe. It should support schema less (per-feature) input to have parity with geojson/geobuf. Possibly deprecate geobuf input to simplify overall.
I think deprecating geobuf makes sense. It doesn't seem to work for larger files--at least on my machine, json2geobuf runs out of memory with a 4.5 GB input.
Based on a comment from the developer, memory issues may be inevitable with geobuf.
Relevant issue re: FlatGeobuf here: https://github.com/flatgeobuf/flatgeobuf/issues/125
In order to keep parity with the "GeoJSON Extension" described here: https://github.com/protomaps/tippecanoe#geojson-extension we need to think of a different strategy, since FlatGeobuf does not support arbitrary extensions like Geobuf does. The readme describes a way of modifying a ndjson by moving the relevant properties from the normal GeoJSON feature properties. For the FlatGeobuf case we can define a set of prefixes for properties like tippecanoe:maxzoom instead of needing the extension.
@bdon nice to see this initiative! Does this still mean a Go (reference?) implementation is needed?
@bjornharrtell while I'd like it for my other projects, a Go implementation isn't needed for tippecanoe - I have vendored in the C++ headers here https://github.com/protomaps/tippecanoe/tree/flatgeobuf which should be all that is necessary.
Checklist:
- [ ] streaming: #9
- [ ] extensions: #7
- [x] support for embedding FGB primary keys (sequence numbers) in output tiles
- [ ] heterogenous collections: #8
- [ ] verify all columns are translated correctly to MVT, other than binary (not representable)
Migrated to https://github.com/felt/tippecanoe/issues/21