[gdal-dev] Point density gdal_rasterize -add switch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Point density gdal_rasterize -add switch

Karl Zinglersen-2
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

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Point density gdal_rasterize -add switch

jratike80
> 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

Hi,

I have never used the -add option but I would try it as

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

-Jukka Rahkonen-



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Point density gdal_rasterize -add switch

Karl Zinglersen-2
The rasterization of points, lines and polygons went nicely with -burn 1 -add to a discrete heat map. Thank you, Jukka.

Particularly we where happy with the line density, but have a follow-up question:
What does the raster values represent?

We did a vector polygon grid test clipping up the lines, where line length or line count were different, so we guess it is something else.

Karl

Den 30. jan. 2018 17.16 skrev "jratike80" <[hidden email]>:
> 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

Hi,

I have never used the -add option but I would try it as

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

-Jukka Rahkonen-



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev