[gdal-dev] Can't get gdal_rasterize to work... with anything.
Karen Pease
meme at eaku.net
Sat Dec 13 10:07:37 PST 2014
Okay, so, I think this may be getting me a bit closer to a solution.
The output image of your command still wasn't viewable to me, either in
gimp or gwenview. However, when I used ImageMagick to convert it to a
PNG or other format, for the first time I saw some detail, so I guess
it's a tif format that the former two can't read. I tried this approach
on the actual dataset I want to use - IS50V_HAEDARGOGN_24122013_ISN2004.
And indeed, the two stage process worked - to get height lines. But what
I actually want is a 3d height map image, where dark colors are low and
bright colors are high and so forth. So I switched from -burn 1 to the
-3d flag. Now it started outputting 64 bit float files, however; convert
couldn't handle them, nor tifftopnm. So I went back to specifying -ot
Byte or -ot UInt16 so I can use convert. However, the images just come
out all black. This is the same result I get if output directly to pnm
with -of PNM.
- kv, Karen
On lau, 2014-12-13 at 09:18 +0000, Ari Jolma wrote:
> Karen,
>
> For example this command on my computer
>
> gdal_rasterize -burn 1 -l is50v_mannvirki_flakar_24122013 -of GTiff -ts
> 1000 1000 is50v_mannvirki_flakar_24122013.shp x.tiff
>
> produces a 1000 x 1000 geotiff which is mostly zeros except ones where
> the polygons are.
>
> Can you tell us what command did you use?
>
> Ari
>
> ps: the website was a bit difficult to use for non-icelanders.
>
> 13.12.2014, 06:18, Karen Pease kirjoitti:
> > 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
> >
> >
> >
> >
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list