azavea / topobuf

Other
2 stars 1 forks source link

CLI to convert TopoJSON to topobuf format #2

Open jnachtigall opened 1 week ago

jnachtigall commented 1 week ago

Hi,

the geobuf 1.0.1 had a CLI to convert a topojson to a pbf:

json2geobuf: turn GeoJSON or TopoJSON from stdin or specified file to Geobuf on stdout

Current geobuf version also still has the CLIs but without the topojson support.

topobuf seems to have no such CLIs. I have a bunch of topojson files that I want to send from a normal http server (apache) to a map framework like MapLibre or OpenLayers. The idea is to save network bandwidth.

But how to convert the topojson to topobuf format?

maurizi commented 4 days ago

This library isn't under active development, so it's unlikely to have such support directly added.

But it should be relatively trivial to write a simple Node.js program that uses topobuf and can be called from the command-line.