<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY
style="BACKGROUND-POSITION: left bottom; FONT-WEIGHT: normal; FONT-SIZE: 10pt; BACKGROUND-IMAGE: url(http://skins.hotbar.com/skins/mailskins/st/010602/010602water8_1.jpg); MARGIN: 3px 0px 180px 6px; COLOR: #002c5a; BACKGROUND-REPEAT: repeat-x; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffffff"
bgColor=#ffffff stationery_tag_mark hbtype="st" hmark="hotbar_element">
<DIV><SPAN class=542065913-10112004>Hi All,</SPAN></DIV>
<DIV><SPAN class=542065913-10112004></SPAN> </DIV>
<DIV><SPAN class=542065913-10112004>Well, worked out the things I need to put in
to create a custom datum (I think!) with kind help from Frank
Warmerdam.</SPAN></DIV>
<DIV><SPAN class=542065913-10112004>How</SPAN><SPAN
class=542065913-10112004>ever I've got a strange one, I pass the following array
in to the libtiff library, </SPAN></DIV>
<DIV><SPAN class=542065913-10112004></SPAN> </DIV>
<DIV><SPAN class=542065913-10112004>
<DIV><SPAN class=542065913-10112004>unsigned short GeoKeyDirectory[] =
<BR> {<BR> 1, 1, 2, 15, //
1 - version 1, revision 1.2, 3 keys
defined<BR> GTModelTypeGeoKey, 0, 1, ModelTypeProjected,<BR> GTRasterTypeGeoKey, 0, 1, RasterPixelIsArea,<BR> GTCitationGeoKey, TIFFTAG_GEOASCIIPARAMS, 20, 0,<BR> GeographicTypeGeoKey, 0, 1, 32767, //
User_Defined<BR> GeogGeodeticDatumGeoKey,0, 1, 32767, //
User_Defined<BR> GeogPrimeMeridianGeoKey,0, 1, PM_Greenwich, //
We shall assume this, don't know how to find
otherwise....<BR> GeogLinearUnitsGeoKey, 0, 1, Linear_Meter, //
GeogLinearUnitsGeoKey,
Linear_Meter<BR> GeogAngularUnitsGeoKey, 0, 1, Angular_Degree, //
GeogAngularUnitsGeoKey,
Angular_Degree<BR> GeogEllipsoidGeoKey, 0, 1, 32767, //
User_Defined<BR> GeogSemiMajorAxisGeoKey,TIFFTAG_GEODOUBLEPARAMS, 1, 6, <BR> GeogInvFlatteningGeoKey,TIFFTAG_GEODOUBLEPARAMS, 1, 7,<BR> ProjectedCSTypeGeoKey, 0, 1, 32767, //
User_Defined<BR> ProjectionGeoKey, 0, 1, 32767, //
User_Defined<BR> ProjCoordTransGeoKey, 0, 1, CT_TransverseMercator,<BR> ProjLinearUnitsGeoKey, 0, 1, Linear_Meter,<BR> ProjNatOriginLongGeoKey,TIFFTAG_GEODOUBLEPARAMS, 1, 0,<BR> ProjNatOriginLatGeoKey, TIFFTAG_GEODOUBLEPARAMS, 1, 1,<BR> ProjCenterEastingGeoKey,TIFFTAG_GEODOUBLEPARAMS, 1, 2,<BR> ProjCenterNorthingGeoKey,TIFFTAG_GEODOUBLEPARAMS, 1, 3,<BR> ProjScaleAtNatOriginGeoKey,TIFFTAG_GEODOUBLEPARAMS, 1, 4,<BR> // ProjStdParallel1GeoKey,TIFFTAG_GEODOUBLEPARAMS, 1, 5,<BR> 0,0,0,0<BR> };</SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=542065913-10112004> TiffError = TIFFSetField(
m_pTiff, TIFFTAG_GEOKEYDIRECTORY, sizeof( GeoKeyDirectory ), GeoKeyDirectory
);<BR> ok &= TestTiffError( TiffError,
_T("TIFFTAG_GEOKEYDIRECTORY") );</SPAN></DIV></SPAN></DIV>
<DIV><SPAN class=542065913-10112004></SPAN> </DIV>
<DIV><SPAN class=542065913-10112004></SPAN> </DIV>
<DIV><SPAN class=542065913-10112004>which returns saying it detected no error.
But there seems to be some kind of size constraint as the fields :</SPAN></DIV>
<DIV><SPAN class=542065913-10112004></SPAN> </DIV>
<DIV><SPAN class=542065913-10112004>
ProjNatOriginLongGeoKey,TIFFTAG_GEODOUBLEPARAMS, 1, 0,<BR> ProjNatOriginLatGeoKey, TIFFTAG_GEODOUBLEPARAMS, 1, 1,<BR> ProjCenterEastingGeoKey,TIFFTAG_GEODOUBLEPARAMS, 1, 2,<BR> ProjCenterNorthingGeoKey,TIFFTAG_GEODOUBLEPARAMS, 1, 3,<BR> ProjScaleAtNatOriginGeoKey,TIFFTAG_GEODOUBLEPARAMS, 1, 4,<BR></SPAN></DIV>
<DIV><SPAN class=542065913-10112004>are not there when I do a tiff dump. If I
move things around, i.e. by having all the GEODOUBLEPARAMS entries together by
moving GeogSemiMajorAxisGeoKey & GeogInvFlatteningGeoKey to the bottom, it
gets as far as ProjCenterEastingGeoKey, two more further along than it did
before!??</SPAN></DIV>
<DIV><SPAN class=542065913-10112004></SPAN> </DIV>
<DIV><SPAN class=542065913-10112004>Has anybody come across this before. Can I
split the array into two smaller chunks and pass in one after the other, or does
it have to go in as one chunk?</SPAN></DIV>
<DIV><SPAN class=542065913-10112004></SPAN> </DIV>
<DIV><SPAN class=542065913-10112004>Kieron</DIV></SPAN>
<DIV><SPAN class=542065913-10112004></SPAN> </DIV>
<DIV><SPAN class=542065913-10112004></SPAN> </DIV>
<DIV><SPAN class=542065913-10112004></SPAN> </DIV>
<DIV>
<DIV>INTELLISCAN Ltd<BR>Oldmeldrum Business Centre<BR>Colpy
Way<BR>Oldmeldrum<BR>Aberdeen AB51 0BZ<BR>Web: <A
href="http://www.intelliscan.co.uk/">www.intelliscan.co.uk</A></DIV><EMBED_ST
id=stationeryFile widh="0" height="0"
embed_src="C:\\Documents and Settings\\Ioannis\\Application Data\\Hotbar\\eskin\\010602water8_st.htm"></DIV><!--mail_content--><SPAN
id=hotbar_element_used stationery_tag_mark></SPAN></BODY></HTML>