Topojson equivalent to ogr2ogr -clipdst?

307 Views Asked by At

I'am digging in for reprojection, which is often followed by cliping to work on "just the needed data". I noticed that both ogr2ogr could be used for reprojection :

#using ogr2ogr, then crop via ogr2ogr -clipsrc 
ogr2ogr -f 'ESRI Shapefile' -t_srs 'EPSG:...' output.shp input.shp
# or using topojson:
topojson --projection 'd3.geo.albers()' -q 1e5 --id-property=name -- input.shp -o output.json

Ogr2ogr privide cliping capabilities on shapefiles :

ogr2ogr -clipsrc $(WEST) $(NORTH) $(EAST) $(SOUTH) output.shp input.shp

But is there a clip function via topojson ? that i'am not aware of. And if not, how could I crop my topojson data let's say in the bounding box W:0, N:55, E:15, S: 40 (Europe), so I don't have to load json for the whole earth.

Topojson API of Reference.

0

There are 0 best solutions below