Last active
December 14, 2015 11:08
-
-
Save xuanlongma/5076697 to your computer and use it in GitHub Desktop.
invoke system command to convert shapefiles to raster
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
## invoke system command to convert shapefiles to raster | |
## Please install gdal before using this snippet | |
## http://www.gdal.org | |
## 12000: the width of the output raster | |
## 6400: the height of the output raster | |
## layer: the attribute field | |
system(command = 'gdal_rasterize -a input -ts 12000 6400 -l | |
layer /Users/me/Desktop/input.shp /Users/me/Desktop/output.tif') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment