Wednesday, February 25, 2009

Raster masking with gdal_rasterize and PostGIS

Clips an elevation file of Poland to the outlines of the country, plus .12 degrees. Gives a nicely buffered edge.

gdal_rasterize -b 1 -i -burn -9999 PG:'host=localhost dbname='unep'' -sql "SELECT ST_buffer(the_geom, .12) from coastlines where name='Poland'" Poland_elev.tif

No comments: