Re: [gdal-dev] Overlay shapefile onto Geotiff image

2015-06-15 Thread Rutger
Graeme B. Bell wrote
 You'll need to tell it what size you want to burn. You can do that by
 looking at the extents (northeast, southwest) of your current
 raster/geotiff.

If you make a copy of the Geotiff you already have, you can provide it as
the 'destination dataset' for gdal_rasterize, it would then (of course)
automatically pick up all the output properties for you. You can then for
example first burn with value 1, and then to another pass with burn value 0
and set the '-i' flag to invert the rasterization, that way anything not
touching the lines will be set to 0, which you can later use as a nodata
value to get the transparency. 

Note that the destination dataset for gdal_rasterize gets modified 'in
place', so especially when experimenting make sure you always have a
copy/backup.



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/gdal-dev-Overlay-shapefile-onto-Geotiff-image-tp5209980p5210923.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Overlay shapefile onto Geotiff image

2015-06-11 Thread Graeme B. Bell
 
 Hi,
 I have been working on this issue for quite a while. I currently have a 
 GeoTiff image and a shapefile. I would like to overlay the shapefile on the 
 Geotiff, is this possible with Gdal? I looked into gdal_rasterize but I just 
 don't know how to incorporate it with what I need. A code to start with would 
 be great if possible. Or maybe point me into the right direction of probably 
 other libraries that could do this.

First, turn your shapefile into a geotiff. You can do this by reading the 
documentation and searching google for gdal_rasterize.
You'll need to tell it what size you want to burn. You can do that by looking 
at the extents (northeast, southwest) of your current raster/geotiff.

Second, overlay the 'shapefile geotiff' onto the other geotiff.
To do this, read the documentation for 

gdal_merge.pyor gdalwarp

Both of them can do what you want.
And look for some online articles about those tools for practical examples.

For example, read this and try to practice it: 


http://geoinformaticstutorial.blogspot.no/2012/11/convert-shapefile-to-raster-with-gdal.html
 

Graeme Bell
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Overlay shapefile onto Geotiff image

2015-06-09 Thread Ronquillo, Edgar Nahum
Hi,
I have been working on this issue for quite a while. I currently have a GeoTiff 
image and a shapefile. I would like to overlay the shapefile on the Geotiff, is 
this possible with Gdal? I looked into gdal_rasterize but I just don't know how 
to incorporate it with what I need. A code to start with would be great if 
possible. Or maybe point me into the right direction of probably other 
libraries that could do this.

Thanks for the help
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev