Last active
March 9, 2021 19:53
-
-
Save palewire/24c728bbdd2e3490c4456011adcc8d9f to your computer and use it in GitHub Desktop.
Repair and overwrite all shapefiles in the current directory using mapshaper's -clean option
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| for FILEPATH in ./*.shp; do | |
| FILENAME="$(echo "$FILEPATH" | rev | cut -d "/" -f1 | rev)"; | |
| echo "Cleaning $FILENAME"; | |
| mapshaper $FILEPATH -clean -o force $FILEPATH; | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment