[Gdal-dev] PNG Heightfield
Frank Warmerdam
warmerdam at pobox.com
Mon Mar 22 10:56:05 EST 2004
J Douglas Gough wrote:
> I guess that question isn't really appropriate for this list. Sorry 'bout
> that.
Doug,
Any particular reason you think your question is inappropriate for the GDAL
list? I don't think it is quite dead-on, but it isn't unreasonable.
> ----- Original Message -----
> From: J Douglas Gough
> To: gdal-dev at remotesensing.org
> Sent: Friday, March 19, 2004 10:48 AM
> Subject: [Gdal-dev] PNG Heightfield
>
>
> I would like to create a heightfield from an ArcInfo grid. So far, I have
> successfully converted an elevation grid to a 16 bit grayscale PNG using
> gdal_translate. I can see the difference in brightness correleates to
> height, but I'm stuck here. I'm thinking I'll need to create a pallette and
> lookup table so there are 65,536 possible values. That should give me
> plenty of room to account for -5000 to +5000 meters or some other range that
> covers the min/max elevation in meters for any given point. Just looking
> for some tips or examples.
In theory GDAL supports large palettes (palettes larger than 256 colours)
but in practice this doesn't work with many formats, and there are few
applications that will properly take advantage of them. So before, launching
into this approach you might want to consider other approachs such as scaling
to 8bit and then applying a color table, or using a display application that
can apply color tables to raw 16bit heightfields.
There are various kinds of color ramps used for elevation data, but I don't
have any particular sage advice on what to use.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list