Last active
August 29, 2015 14:26
-
-
Save patchdynamics/3d38d1099acf8016c608 to your computer and use it in GitHub Desktop.
Batch convert shape to raster user GDAL
This file contains 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
find *.shp -exec gdal_rasterize -burn 1 -tr 200 200 {} ../nasqan_raster_lambert/{}.tif \; | |
# improve performance by loading more data into memory at once | |
find *.shp -exec gdal_rasterize --config GDAL_CACHEMAX 2400 -burn 1 -tr 30 30 -a_srs EPSG:5070 -of HFA {} ../nasqan_raster_conus/{}30.img \; | |
# compress tiffs using LZW to vasty improve disk performance | |
find *.shp -exec gdal_rasterize --config GDAL_CACHEMAX 4000 -burn 1 -tr 30 30 -a_srs EPSG:5070 -co COMPRESS=LZW {} ../nasqan_raster_conus/{}30.tiff \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment