gdal tutorial notes


Nelson's log

I took a quick trip through this gdal tutorial on raster data, albeit with SRTM data instead of the example data. Things I learned:

  • gdalinfo has useful flags for finding min/max values, stats, etc.
  • gdal_translate is how you render a dataset to an image
    gdal_translate -ot byte -scale 1152 3184  -of PNG  N39W120.hgt test.png
    Input range doesn’t seem to autoscale, despite what the docs say. Haven’t figured out how to apply a custom colormap yet. (The FAQ is discouraging, but gdaldem color-relief might do what I need.) The PNG output from GDAL doesn’t seem to have any geodata stored in PNG chunks.
  • gdalwarp is how you reproject data
  • gdal_merge is how you mosaic images. You can use gdalwarp to do it, too, but it’s overkill.
    gdalwarp N39W120.hgt N39W121.hgt N38W120.hgt N38W121.hgt big.tiff
    gdal_translate -outsize 50% 50% -scale 1000 3000 -of PNG big.tiff test.png
  • gdal_rasterize lets you render vector data (via…

View original post 55 more words


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: