[Gdal-dev] Save GeoTiff
schut at sarvision.com
Wed Mar 12 11:34:23 EST 2003
On Wednesday 12 March 2003 17:03, you wrote:
> Ok, I converted it to a goetiff file with a "byte"
> widht, but I get a complain from the goetiff viewer
> satating "Not a geotiff DEM filie"
> and this is expected, as I am supposed to deal with
> NED files which are geotiff files with a 32 bit
> floating bit data, when the application found that the
> data isn't 32 bit floating it didn't approve it.
> My main scope is NED and not GeoTiff, but simply NED
> data comes in many format flavors one of which is
> GeoTiff but it must be 32 bit floating point.
Ah well but I think DEM files would never have 3 bands... That's the problem
maybe. You can either have a DEM file, which in fact is not an image but just
a floating point, 2-dimensional dataset, or you can have an image (that may
be representing the height as colors) which can have 3 bands, but is of
course not a DEM. I mean, if a DEM had three bands, what would the
interpretation of these bands be?
If you really want to make a DEM out of a BMP file (correct me if I'm wrong,
but it sounds like you're trying to do something like that...), you probably
could do it by one more gdal_translate step: make a new geotiff from the
32bit float 3 band geotiff, using only one band (use gdal_translate -b [ band
number ] [3bandfloat.tif] [1bandfloat.tif] ). But I wonder whether this file
would be a good representation of the original 256 color file.
> --- Vincent Schut <schut at sarvision.com> wrote:
> > On Wednesday 12 March 2003 16:28, Ayman Kamal wrote:
> > > I attach the file "fltinfo.txt" that contains the
> > > fltinfo for two images, the first one is a colored
> > 256
> > > color image, the second is the same as the first
> > but
> > > converted to gray scale.
> > >
> > > The colored one causes the problem, but the gray
> > scale
> > > doesn't
> > >
> > > The program that complained about the colored
> > image
> > > file is "3DEM"
> > Ayman,
> > I just saw your fltinfo.txt and would like to add my
> > 2c to your thread:
> > For both of the images, you are using a datatype of
> > 32 bit floating point. It
> > is very well possible that not all viewers can show
> > a 3 band 32bit float
> > tiff? Maybe you could try to save it with outputtype
> > byte. You won't need
> > 32bit floating point anyway, if your data came from
> > 256 color bmp... Saving
> > as byte would save you a lot of disk/memory space
> > (and reading speed). You
> > could also try to save it as a 8 bit palette image,
> > but I am not shure
> > whether gdal_translate can produce such a tiff
> > file...
> > Regards,
> > Vincent Schut.
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online
Vincent Schut (schut at sarvision.com)
Wageningen, The Netherlands
More information about the Gdal-dev