0

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.

Community
  • 1
  • 1
Hugolpz
  • 17,296
  • 26
  • 100
  • 187
  • 1
    "You can clip in conjunction with --projection by specifying a clipped projection (e.g., clipAngle, clipExtent)." ([RETWEET of @mbostoc](https://twitter.com/mbostock/status/534830742682230784)) – Hugolpz Nov 18 '14 at 22:28
  • Seems [there are](http://bl.ocksplorer.org/#/search/d3.geo.clipExtent) some interesting case-studies. – Hugolpz Nov 18 '14 at 22:36

0 Answers0