Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-q.one.com (mx-q.one.com [91.198.169.248])
	by mail6.local (Postfix) with ESMTP id 706998010611B
	for <filtered@awaresystems.be>; Wed, 21 Nov 2012 08:06:18 +0100 (CET)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-q: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.212.48 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48])
	by mx-q.one.com (Postfix) with ESMTP id 0D9731328315
	for <filtered@awaresystems.be>; Wed, 21 Nov 2012 07:06:17 +0000 (UTC)
Received: by mail-vb0-f48.google.com with SMTP id l22so6571094vbn.21
        for <filtered@awaresystems.be>; Tue, 20 Nov 2012 23:06:17 -0800 (PST)
Received: by 10.52.33.130 with SMTP id r2mr21365647vdi.43.1353481577356;
        Tue, 20 Nov 2012 23:06:17 -0800 (PST)
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.58.144.166 with SMTP id sn6csp489845veb;
        Tue, 20 Nov 2012 23:06:14 -0800 (PST)
Received: by 10.52.66.10 with SMTP id b10mr23708533vdt.71.1353481572982;
        Tue, 20 Nov 2012 23:06:12 -0800 (PST)
Received-SPF: neutral (google.com: 91.198.169.58 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=91.198.169.58;
Received: by 10.220.204.75 with POP3 id fl11mf1574718vcb.12;
        Tue, 20 Nov 2012 23:06:12 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-k.one.com (mx-k.one.com [91.198.169.58])
	by mail6.local (Postfix) with ESMTP id A33A480106116
	for <info@awaresystems.be>; Wed, 21 Nov 2012 07:36:36 +0100 (CET)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-k.one.com (Postfix) with ESMTP id 496ED217FB7
	for <info@awaresystems.be>; Wed, 21 Nov 2012 06:36:36 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 0975443A02A;
	Wed, 21 Nov 2012 01:34:03 -0500 (EST)
Received: from nm35.bullet.mail.gq1.yahoo.com (nm35.bullet.mail.gq1.yahoo.com
	[98.136.217.18])
	by lists.maptools.org (Postfix) with ESMTPS id 170C443A021
	for <tiff@lists.maptools.org>; Wed, 21 Nov 2012 01:33:33 -0500 (EST)
Received: from [98.137.12.63] by nm35.bullet.mail.gq1.yahoo.com with NNFMP;
	21 Nov 2012 06:33:37 -0000
Received: from [208.71.42.191] by tm8.bullet.mail.gq1.yahoo.com with NNFMP;
	21 Nov 2012 06:33:37 -0000
Received: from [127.0.0.1] by smtp202.mail.gq1.yahoo.com with NNFMP;
	21 Nov 2012 06:33:37 -0000
X-Yahoo-Newman-Id: 806496.23477.bm@smtp202.mail.gq1.yahoo.com
X-Yahoo-Newman-Property: ymail-3
X-YMail-OSG: ce0Gt0UVM1ladaYWkb.uEok5rcw85TTIqTTLt8OmRhL7l7Z
	YproL0vBQp7bYWw1O98qN1W.Jjgn.LTNuU9mjMeHQx_aIJOZOkD0ChY2OCLW
	cZQ0cc33owWj5cfJmi5gVBfqsAJtrZ_U2M84HISV4Hb1X1DNvjphTNsEs29f
	XfEoh8Fow03BOMLenpRdVco36u5_rlJ32XpJaxhYNfKT2lT5c65q6ezX7fVA
	GhrzGSGFGP4NovzQ2pYCWV90Hwe8DQHMAC5P.ER5jMCexRSOMq2uGWgCa_NM
	oA_eFfinknbclv_TZTU7tJZH6ZK.CHJJmydSLMlhdBphONhBEq91X.59Bkxf
	BxhdtiFPki_N3J.QH3oo.0PuRv0iPHGIP2lsIuTNXsN5M1mAmZyrEs7fahva
	vbWV9yyf1qswoFOPl2AAf8DHOkGtNz.fiYTGarGT9aQsnw4yc6oAOE7F.1wA
	dii2ya7327tjJTH6bhH99NXx2gTgiIUg-
X-Yahoo-SMTP: nRrVUUOswBBfxDC78XSN4dJH9gnBaNVT
Received: from [192.168.0.171] (oscarkramer@72.28.133.151 with plain)
	by smtp202.mail.gq1.yahoo.com with SMTP; 20 Nov 2012 22:33:37 -0800 PST
Message-ID: <50AC75BD.8010801@yahoo.com>
Date: Wed, 21 Nov 2012 01:33:33 -0500
From: Oscar Kramer <oscarkramer@yahoo.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121028 Thunderbird/16.0.2
MIME-Version: 1.0
To: tiff@lists.maptools.org
Subject: [Tiff] XTIFFClientOpen scheme not generating proper geotiff tags
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="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

Hi,

I am trying to use XTIFFClientOpen in order to read and write geotiff 
files from within the hadoop HDFS file system. I followed the examples 
provided for implementing the read, write, seek, close, and other 
functions required. I am able to successfully open and read a geotiff 
from HDFS using this scheme. However, writing a geotiff image is not 
working properly.

The output file is missing what seem to be geotiff-specific tags, though 
I'm not sure (I'm comparing hex dumps of a good file against a bad). The 
differences are just two bytes near the very beginning of the file, 
namely, the offset to the first IFD. The good file has 0x0C0008 while 
the bad one just has 0. The only other difference is at the end of the 
file where the good one has about 680 bytes (starting at offset 
0x0C0008) while the bad just ends at 0x0C0008. All the data in between 
-- which appears to be pixel data -- is identical.

I bypassed all the HDFS stuff and had my client functions 
read/write/seek using just the local FS to eliminate that variable and I 
see the same thing, so the problem is not HDFS related.

I am using the same code for populating and writing the tags as I do 
when interfacing to the geotiff lib using the conventional XTIFFOpen 
function.  In both instances I'm calling GTIFWriteKeys() after 
populating the keys. What baffles me is that I don't see my write 
function being called within GTIFWriteKeys.

I suspect that the issue is with the close function not properly 
flushing the geo-tags. The only thing my client close function does is 
actually close the file -- just a one-liner with no additional writes of 
any kind.

Is there something special (i.e., geotiff-specific) I need to do when 
using XTIFFClientOpen and its i/o functions to insure the geotiff tags 
get written out?

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