[gdal-dev] Point density gdal_rasterize -add switch

Karl Zinglersen karl.zinglersen at gmail.com
Tue Jan 30 11:09:52 PST 2018


I think of create a discrete raster from points burning the number of
points of each cell into the band value. In the manual at
http://www.gdal.org/gdal_rasterize.html I figure out, that the -add switch
could be the solution. But no value has to be set unlike -burn or -a
switches.

What is the syntax for the -add switch.

Burn works:
gdal_rasterize.exe -burn 1 -tr 20 20 -l points c:/Temp/points.shp
c:/Temp/out.tif

Add doesn't
gdal_rasterize.exe -add -tr 20 20 -l points c:/Temp/points.shp
c:/Temp/out.tif

ERROR 6: One and only one of -3d, -burn or -a is required.
(-add not mentioned)

I don't think, I fully understand the manual:

Instead of burning a new value, this adds the new value to the existing
raster. Suitable for heatmaps for instance.
Installed gdal through QGIS incl. gdal_dev, both tried.

Can you give me a hint to use -add properly?

Alternatives tried:
- We have used kernel density in QGIS w. GRASS, but we think it
interpolates / searches too far.
- Points in polygon, but is too heavy for the area (Greenland EEZ).

Next step is to do raster density of lines, eventually through
gdal_rasterize or other non-interpolating / non-searching algorithm.

Karl

-- 
Karl Brix Zinglersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180130/c57a44a0/attachment.html>


More information about the gdal-dev mailing list