<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19019"></HEAD>
<BODY>
<DIV><SPAN class=359002016-22022011><FONT size=2
face=Verdana>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2
face=Verdana></FONT></SPAN> </DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>I've been trying
to create a lossless JPEG2000 image from a signed 16-bit DEM (stored in a TIFF
file),</FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>but have had no
success so far with JP2KAK.</FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>My DEM has large
NoData regions (value is DTED NoData : -32767)</FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2
face=Verdana></FONT></SPAN> </DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>I
tried different GDAL versions (1.7 1.8), and different versions of
KAKADU (6.3, 6.2)</FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2
face=Verdana></FONT></SPAN> </DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>I'm using
gdal_translate -of JP2KAK -co QUALITY=100 <input.tif>
<output.tif></FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2
face=Verdana></FONT></SPAN> </DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>The image is
created with no errors, but shows strong artefacts around Nodata parts,
while the large NoData areas are transformed to random 16bit
garbage.</FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>It's not a
solution to use lossy conversion, because NoData values would be
lost.</FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2
face=Verdana></FONT></SPAN> </DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>However, using
kakadu tools there is no problem : Creversible is used instead of
QUALITY=100</FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011>kdu_compress.exe -i <source>.tif -o
<target>.jp2 Clayers=12 Creversible=yes </SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2
face=Verdana></FONT></SPAN> </DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>So I guess the
problem comes from GDAL JP2KAK driver.</FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>A quick look at
the code gave me no clue.</FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2
face=Verdana></FONT></SPAN> </DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>I also checked if
it was coming from the signed type (Int16), but that problem also occurs with
unsigned 16-bit data (same data with a +32768 offset to have positive
values)</FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2
face=Verdana></FONT></SPAN> </DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>thanks in advance
for any hint,</FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>best
regards,</FONT></SPAN></DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2
face=Verdana></FONT></SPAN> </DIV>
<DIV><SPAN class=359002016-22022011><FONT size=2 face=Verdana>Frederic
Claudel</FONT></SPAN></DIV>
<DIV><FONT size=2 face=Verdana></FONT> </DIV></BODY></HTML>