[gdal-dev] Can't get gdal_rasterize to work... with anything.

Andre Joost andre+joost at nurfuerspam.de
Sun Dec 14 01:09:38 PST 2014


I guess you are getting an empty image because you have not told gdal 
which field includes the height data. I was successful with

gdal_rasterize -a HAEDDYPIME -ts 5000 3000 -l is50v_haedarlinur_24122013 
D:/Download/NEU/IS50V_HAEDARGOGN_24122013_ISN2004/IS50V_HAEDARGOGN_SHP/is50v_haedarlinur_24122013.shp 
D:/Karten/shp/Laender/Island/DEM.tif

You can import the shapefiles into QGIS, label them and look into the 
attribute table. You will find that headarlinur has the contour lines, 
with the height value in haeddypime. headarpunktar has only peaky, so it 
is not usefiul for generating a height map of the whole island.

HTH,
André Joost

Am 13.12.2014 um 07:18 schrieb Karen Pease:
> Hi all,
>
> I'm running Fedora 21 with a fresh built gdal-1.9.2. Try as I might, I
> can't get gdal_rasterize to output anything other than purely
> transparent images, purely white images, or purely black images.
>
> I want to use it on this dataset - "Elevation data. GDB og SHP.
> ISN2004":
>
> http://atlas.lmi.is/LmiData/index.php?id=1079838344912
>
> I've spent maybe 8 hours on this, including trying all sorts of
> different commandlines. After finding that I couldn't get that to work,
> I found some sample tutorials that includes a shp file and some command
> lines to use it with gdal_rasterize:
>
> http://disc.sci.gsfc.nasa.gov/dataholdings/?q=recipes/How-to-Obtain-a-Shapefile-based-Data-Subset-with-GrADS
> http://www.openforis.org/OFwiki/index.php/Special:WhatLinksHere/Example_data_set
>
> None of these work for me either (using it exactly as they say to), so I
> don't think it's my shp files that's the problem; I think it's
> gdal_rasterize or something it depends on. I know the problem isn't an
> image viewer problem either - I've tried multiple viewers, and I've
> tried saving the files to PNM to allow for manual inspection - they all
> contain only the same data value repeated over and over, no variation,
> just pure one color.
>
> What should I do? I really need to make a heightmap out of this
> landscape data for inclusion into a 3d model...
>
>   - kv, Karen
>




More information about the gdal-dev mailing list