Changes between Initial Version and Version 2 of Ticket #3778


Ignore:
Timestamp:
Oct 13, 2010, 7:07:34 AM (14 years ago)
Author:
moellney
Comment:

Replying to rouault:

The TIFF file isn't valid if it is meant at having signed values. Namely the value of the SAMPLEFORMAT tag is 1 (SAMPLEFORMAT_UINT) in your example, whereas it should be 2 (SAMPLEFORMAT_INT).

This can be corrected by example with the tiffset utility of libtiff

tiffset -s 339 1 2 Hongkong_test1.tif

Thanks for the hint. In tiff is seems to be possible to signal signed or unsigned. Your example works and gives nice results with gdal_contour.

But do you know if png supports signed integer?

Let me cite from the capabilities file of the nasa wms:

<Layer queryable="0">
      <Name>worldwind_dem</Name>
      <Title>SRTM derived global elevation, 3 arc-second</Title>
      <Abstract>
	A global elevation model, prepared from the 3 arc-second SRTM dataset by filling some
        of the problem areas. Prepared by the NASA Learning Technologies.
	The default style is scaled to 8 bit, non-linear.
	It is possible to request the elevation data in meters by the short_int tyle and
        requesting PNG format. The resulting PNG file will be a unsigned 16 bit per pixel
        image. The values are then the elevation in meters.
	Values are signed 16 bit integers, but PNG will present them as unsigned, leading to a 
        few areas with very large values (65000+)
	For elevation values in feet, request PNG format with the style feet_short_int.
      </Abstract>

Legend:

Unmodified
Added
Removed
Modified