node.js - Converting Shape Files to TopoJSON using the TopoJSON 2.0 API -


i'm trying create app allow interact of zip codes in of states. i'm accomplishing using topojson , d3 draw maps. i've had lot of trouble finding topojson file has data need, i've used gqis create own shapefiles of states.

the last step have converting shape file create topojson file. i've watched tutorials used old version of topojson command line, , able transform shapefiles topojson files running command this:

topojson -p -o illinois.zcta.json -- illinois.shp 

my understanding anatomy of request is:

topojson (invoking node module) -p(all properties) -o(all objects) illinois.zcta.json(name of file want) -- illinois.shp(name of file convert) 

however, topojson api appears have been updated , no longer supports request. i've installed topojson globally using npm , trying run function above alerts me topojson not function.

i've dug the documentation surrounding new version of topojson command line , appears more complicated. there ton more ways slice data - none of them appear take shapefile , convert topojson, or take shape file , convert geojson change topojson. seems odd me functionality (changing .shp file directly topojson file) removed - although fact magical in first place. can direct me best way convert shape files topojson files? thanks.

you should able use sequence of shp2json (https://github.com/substack/shp2json) , geo2topo (https://github.com/topojson/topojson-server/blob/master/readme.md#geo2topo). can geojson straight qgis in case can skip first step.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -