<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.Heading1New, li.Heading1New, div.Heading1New
        {margin:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:"Times New Roman";
        font-weight:bold;}
span.EmailStyle18
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:2019232641;
        mso-list-type:hybrid;
        mso-list-template-ids:-1202548742 -624292644 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hello All,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:6.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>I am relatively new to creating Tiff
or GeoTiff files. Thus, I apologize in advance for any obvious errors
contained herein.<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:6.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:6.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>I am creating a GeoTiff file for a
customer who requires that Unicode text strings be stored in the file. The
text strings consist of Japanese Kanji characters. Therefore, an ASCII
string will not suffice.<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:6.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:6.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>My original plan was to generate a
private GeoTiff key tag and store the Unicode string as the value for that tag.
As GTIFKeySet() only supports types SHORT, DOUBLE, and ASCII, I planned
to treat the Unicode string as type SHORT with a length equivalent to the
actual string length. Looking at the source code for GTIFKeySet(), I find
that parameter “count” must equal 1 value for types SHORT and
DOUBLE. I can not use type ASCII and pass in a proper string length for
the “count” parameter because GTIFKeySet() ignores the “count”
parameter and does a strlen() instead. Since some Unicode characters have
a leading 0 byte, that method would not work for all possible characters in a
Unicode string.<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:6.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:6.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>I have searched the mail archive and
have not found a solution for this problem.<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:6.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:6.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Has anyone already solved this
problem or have any suggestions for me? Do I need to create a private
TIFF tag instead and use TIFFSetField from tifflib?<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:6.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:6.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>I am developing on windows and am
using the libtiff.dll and geotiff.dll from the Geotiff_win32_devkit.zip. My
code inspection of GTIFKeySet() was from the 1.3.2 GeoTiff zip file.<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:6.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:6.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Best Regards,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Ken<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Ken Garner</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Principal Software Engineer</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>L-3 Communications Klein Associates, Inc.</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Office (603) 893-6131 X-289</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Web: <a href="http://www.L-3Klein.com">www.L-3Klein.com</a></span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=DE style='font-size:10.0pt;
font-family:Arial'>E-Mail: </span></font><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><a
href="mailto:Ken.Garner@L-3com.com"><span lang=DE>Ken.Garner@L-3com.com</span></a></span></font><span
lang=DE><o:p></o:p></span></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=DE
style='font-size:12.0pt'> </span></font><span lang=DE><o:p></o:p></span></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=DE
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>