Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx05.one.com (mx05.one.com [195.47.247.76])
	by mail6.local (Postfix) with ESMTP id 0FDDA300306298
	for <filtered@awaresystems.be>; Fri,  9 May 2014 19:30:18 +0000 (UTC)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx05: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.215.53 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-la0-f53.google.com (mail-la0-f53.google.com [209.85.215.53])
	by mx05.one.com (Postfix) with ESMTP id CC2F893358A
	for <filtered@awaresystems.be>; Fri,  9 May 2014 19:30:17 +0000 (UTC)
Received: by mail-la0-f53.google.com with SMTP id ec20so205158lab.12
        for <filtered@awaresystems.be>; Fri, 09 May 2014 12:30:17 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-original-authentication-results:delivered-to:delivered-to:from:to
         :date:user-agent:references:in-reply-to:mime-version:message-id:cc
         :subject:precedence:list-id:list-unsubscribe:list-archive:list-post
         :list-help:list-subscribe:content-type:content-transfer-encoding
         :sender:errors-to;
        bh=mRy2QMwSLFTkQ+fC83K2Cw6Pj3dZnaszRYy2t3BGEc4=;
        b=DANBzNKvL7NS9343hdCZy11zm2tSaeHYyGvndFZ4+6MvdG/7iczt2mnGyg+0fJ83/1
         WDDYy22PxbPcT77Tu546bJ54iCiP9ObD94KE7hAl0xgx5dV6Y/w9G73+NxCMbibvggEk
         8eqOK38ok69oC3AP6Xda6BxTrLAb2JoSk2+RPpvdBvhpgO1FXI8Ht304RAcf0rcmkJWj
         tyjBQCBeXwM94fj7/BWagf1Y/URQuGdq2oxZ/PnfE2tAZdgkAGHhzFw/MfKZPvRaGoGq
         ntYI07tQiaJJYoETbUw2Respp2qJAxNJ7sEC85O84xEnMnWY1Fr+HwGD2E9iaYHRwvAN
         NLVQ==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) smtp.mail=tiff-bounces@lists.maptools.org
X-Received: by 10.152.4.1 with SMTP id g1mr696157lag.20.1399663817440;
        Fri, 09 May 2014 12:30:17 -0700 (PDT)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.114.18.137 with SMTP id w9csp8960ldd;
        Fri, 9 May 2014 12:30:17 -0700 (PDT)
X-Received: by 10.152.246.11 with SMTP id xs11mr64103lac.73.1399663815666;
        Fri, 09 May 2014 12:30:15 -0700 (PDT)
Authentication-Results: mx.google.com;
       spf=neutral (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) smtp.mail=tiff-bounces@lists.maptools.org
Received-SPF: none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) client-ip=91.198.169.59;
Received: by 10.112.33.104 with POP3 id q8mf2835337lbi.23;
        Fri, 09 May 2014 12:30:15 -0700 (PDT)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-l.one.com (mx-l.one.com [91.198.169.59])
	by mail6.local (Postfix) with ESMTP id 367EB300306298
	for <info@awaresystems.be>; Fri,  9 May 2014 18:48:39 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (ks365428.kimsufi.com [94.23.4.142])
	by mx-l.one.com (Postfix) with ESMTP id 11C0A22CFE2C1
	for <info@awaresystems.be>; Fri,  9 May 2014 18:48:38 +0000 (UTC)
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 0D13535C03F;
	Fri,  9 May 2014 13:47:31 -0500 (EST)
Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1])
	by lists.maptools.org (Postfix) with ESMTP id 12C1935C03F
	for <tiff@lists.maptools.org>; Fri,  9 May 2014 13:46:57 -0500 (EST)
Received: from even-desktop.localnet (unknown [88.162.84.61])
	by smtp1-g21.free.fr (Postfix) with ESMTPS id E7A3E940169;
	Fri,  9 May 2014 20:45:55 +0200 (CEST)
From: Even Rouault <even.rouault@mines-paris.org>
To: tiff@lists.maptools.org
Date: Fri, 9 May 2014 20:46:53 +0200
User-Agent: KMail/1.13.5 (Linux/2.6.32-46-generic; KDE/4.4.5; x86_64; ; )
References: <CAHjiUbpE=rBdVpspeb4kFhfp9Vfrbd=2t4ZooYhcQBFDugEJQw@mail.gmail.com>
	<alpine.GSO.2.01.1405090900520.1735@freddy.simplesystems.org>
In-Reply-To: <alpine.GSO.2.01.1405090900520.1735@freddy.simplesystems.org>
MIME-Version: 1.0
Message-Id: <201405092046.54245.even.rouault@mines-paris.org>
Cc: Jeff Breidenbach <jeff@jab.org>
Subject: Re: [Tiff] what's up with all the seeking?
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
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>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

Le vendredi 09 mai 2014 16:03:30, Bob Friesenhahn a =E9crit :
> On Thu, 8 May 2014, Jeff Breidenbach wrote:
> > Is TIFF fundamentally incompatible with streaming?
> =

> In order for TIFF to be "streamed" you would need to implement an I/O
> layer for libtiff to use and the I/O layer would need to add any
> necessary buffering so that it buffers all data up to any requested
> seek or read offset.  It might be necessary to buffer the entire image
> data.
> =

> A simple workaround is to read the input into a temporary file.

I agree with others that, generally, the TIFF format isn't not compatible w=
ith =

streaming.

That said, if you have full control on how libtiff is used (and if you mast=
er =

its behaviour) to produce the TIFF and how it will be read, it *might* be =

streamable.

For example I've used GDAL to produced a tiled uncompressed TIFF (tile =

dimension:256x256), 3 bands, contiguous planar config : out.tif
If I use GDAL translate to read it and produce a TIFF with exact configurat=
ion, =

the read-pattern used by the GDAL I/O will be compatible with streaming :

$ cat out.tif  | gdal_translate /vsistdin/ out2.tif -co tiled=3Dyes
Input file size is 21600, 21600
0...10...20...30...40...50...60...70...80...90...100 - done.

But that's really a particular case.

I didn't manage to produce for example a JPEG-compressed TIFF that has that =

priority. For some reason (probably due to the writing of the JPEGTABLES), =
the =

TIFF directory gets rewritten at the end of the file instead of being at th=
e =

beginning. And you loose streaming capability.

Even

-- =

Geospatial professional services
http://even.rouault.free.fr/services.html
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
