[gdal-dev] Creating a transparent GeoTIFF, writing shape data over it, reading GeoTIFF writing as PNG with transparency.

Mark Johnson mj10777 at googlemail.com
Thu Jun 11 05:38:35 PDT 2015


Question 2 is now finished:

https://github.com/geopaparazzi/Spatialite-Tasks-with-Sql-Scripts/wiki/Project-1811-gdal_question-02

Short version:

gdal_rasterize -tr 0.475211759942328 0.475212956422887 -te 24800 20700
25800 21300 -ot Byte -init 192 -a_nodata 192 -burn 0 -burn 173 -burn 83
-sql "SELECT ST_Buffer(soldner_segment,2.5) FROM segments_berlin_1786"
../sources/berlin_segments_qgis.db segments_berlin_1786_green.tif

and combine the images with
- gdalbuildvrt and gdal_translate

---

This was the first time I used gdal_rasterize and found the sample on the
htlm-page misleading
- there is no sample on creating a image that can be overlayed (i.e. create
a new image)
- the first sample, assumes one is directly overwriting another image
-- when using that sample in creating an new image it will fail, since '.b'
is not permitted in new images
- there is no sample on how to influence the width of the of the created
lines

All of this is useful for someone trying this out for the first time.

Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150611/0afad4ab/attachment.html>


More information about the gdal-dev mailing list