Received: from inav032.isp.belgacom.be (localhost.localdomain [127.0.0.1])
	by inav032.isp.belgacom.be (Postfix) with ESMTP id 42C4FAEFFD
	for <joris.at.lebbeke@skynet.be>; Wed, 17 Jan 2007 09:23:08 +0100 (CET)
Received: from inas004.isp.belgacom.be (inas004.isp.belgacom.be [195.238.4.12])
	by inav032.isp.belgacom.be (Postfix) with ESMTP id 2B310AEFF9
	for <joris.at.lebbeke@skynet.be>; Wed, 17 Jan 2007 09:23:08 +0100 (CET)
Received: from inmx004.isp.belgacom.be (inmx004.isp.belgacom.be [195.238.5.48])
        by inas004.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AS-2.03) with ESMTP id l0H8N500024587
        for <joris.at.lebbeke@skynet.be>; Wed, 17 Jan 2007 09:23:06 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx004.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id l0H8N05f008601
        for <joris.at.lebbeke@skynet.be>; Wed, 17 Jan 2007 09:23:01 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l0H7xPtM000362;
	Wed, 17 Jan 2007 03:00:29 -0500
Received: from outfbmx006.isp.belgacom.be (outfbmx006.isp.belgacom.be
	[195.238.5.101])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l0H7xL5V000359
	for <tiff@lists.maptools.org>; Wed, 17 Jan 2007 02:59:22 -0500
Received: from outmx017.isp.belgacom.be (outmx017.isp.belgacom.be
	[195.238.4.116])
	by outfbmx006.isp.belgacom.be (Postfix) with ESMTP id E1759387DE
	for <tiff@lists.maptools.org>; Wed, 17 Jan 2007 08:59:19 +0100 (CET)
Received: from outmx017.isp.belgacom.be (localhost [127.0.0.1])
	by outmx017.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22)
	with ESMTP id l0H7xDnj031928
	for <tiff@lists.maptools.org>; Wed, 17 Jan 2007 08:59:13 +0100
	(envelope-from <joris.at.lebbeke@skynet.be>)
Received: from dfgrrxsknr4e (112.201-244-81.adsl-dyn.isp.belgacom.be
	[81.244.201.112])
	by outmx017.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22)
	with SMTP id l0H7xCDi031919; Wed, 17 Jan 2007 08:59:12 +0100
	(envelope-from <joris.at.lebbeke@skynet.be>)
Message-ID: <001501c73a0d$93f807c0$70c9f451@dfgrrxsknr4e>
From: "Joris" <joris.at.lebbeke@skynet.be>
To: "Craig Bruce" <csbruce@cubewerx.com>,
        "TIFF mailing list" <tiff@lists.maptools.org>
References: <200701170225.l0H2PhRY014173@tux.cubewerx.com>
Subject: Re: [Tiff] Elevation Data
Date: Wed, 17 Jan 2007 09:00:37 +0100
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1807
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896
Cc: 
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.00001f83
X-MSP-STORE: Wed, 17 Jan 2007 09:23:08 +0100
Status:   

Craig,

Craig Bruce wrote:
> I would like to write signed 16-bit elevation data to a TIFF image
> file, but according to the TIFF 6.0 specification, there doesn't
> appear to
> be a correct way to do this.  The specification allows the use of the
> SampleFormat to specify that the samples are signed 16-bit integers,
> but this range of values is incompatible with the
> PhotometricInterpretation tag, which must be present.  The obvious
> PhotometricInterpretation to
> use is BlackIsZero, but its range is defined as 0 to 2**nbits-1 (i.e.,
> unsigned integers).

What is done, mostly, in color data, is adding an offset to the data.
This is done in various encoding of CIE L*a*b*, in YCbCr, etc.

In actual meaning, take your lowest level beneath the see to be 0.
Encode positive offsets from that. Ideally, scale such that your highest
mountain is 2**nbits-1 above that lowest beneath see level. The
advantage of that is that readers that don't know your intent, are still
able to render your (extra?) channel quite nicely.

> Also, is there a semantic difference between SMinSampleValue and
> MinSampleValue?  The spec explicitly states that MinSampleValue is
> just statistical and isn't part of a valid-sample-range definition,
> but it's much more coy about SMinSampleValue.  If it isn't part of a
> hard range definition, then how can one make an interoperable image
> with floating-point samples?

It isn't part of a hard range definition.

Floating point data is interoperable by having ranges defined as is
logical to the colorspace. For example, the range of the L* channel, in
CIE L*a*b*, encoded in floating point, is 0.0 to 100.0, as that is its
intrinsic nature. The range of R, G, or B channels is 0.0 to 1.0. The
range of floating point MinIsBlack or MinIsWhite channels is 0.0 to 1.0.


Best regards,

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
