mbloch / mapshaper

Tools for editing Shapefile, GeoJSON, TopoJSON and CSV files
http://mapshaper.org
Other
3.8k stars 536 forks source link

Add -gridify #238

Open simonepri opened 7 years ago

simonepri commented 7 years ago

Command description

Given a large Polygon or MultiPolygon split it into squares.

Example

Transform this: image into something like this: image

How to do this without a new command

mbloch commented 6 years ago

I propose simply adding a command for creating polygon grids (-polygon-grid), which have a number of applications. In addition to rectangular grids, it would have options for creating hex grids and triangular grids. Once you have a polygon grid, it only takes one -clip command to accomplish the "gridify" effect -- I'd rather not add a special-purpose command for that.