A simple command line tool for clipping large amounts of shapefiles to a given bounds. This tool is needed if a group shapefiles cover a large area and need to be clipped to the exact same bounds, f.e. a country needs to be clipped to a specific city.
- Clone or download this repository.
- With the terminal, go into the repository directory via
cd
and execute (you might need sudo privelages): -
npm install -g
- Get the bounds of the area or city you want to clip to (see below).
- Open the terminal.
cd
to the directory with shapefiles (.shp) you wish to clip.- Enter
mapmaker -b= [westlimit,southlimit,eastlimit,northlimit]
To get the bounds needed for clipping shapefiles:
- visit https://boundingbox.klokantech.com.
- Enter your city/region and use the CSV RAW format values at the bottom in the following order:
mapmaker -b= [westlimit,southlimit,eastlimit,northlimit]