[Geotiff] User defined datum: Transformation parameters
noel khan
noel.khan at rdmd.ocgov.com
Thu Feb 28 19:10:07 EST 2008
Christian,
DISCLAIMER: My perpective if the only the GeoTiff spec. I am not
familiar with the library you are using, which contains the call
"GTIFKeySet."
Please refer to the GeoTif specsection 2.4.
From my understanding, GeoTiff keys can either
[1] store a single SHORT value within the KeyEntry
xor
[2] store values in a TIFF-tag, which means that both [a] the
TiffTagLocation must be set to a nonzero value and [b] the Value_Offset must
be set to the location of the TIFF-tag containing your value(s).
Therefore, it appears that your implementation should involve:
[1] Storing your array of doubles within a TIFF tag that can accomodate
those values. NOTE: Upon storage, I presume you necessarily know the base-0
position of that array within the TIFF file (hereinafter
"*ptrToTiffTagContainingDoubleValues").
[2] Set your GeoTiff KeyEntry {KeyID, TiffTagLocation, Count,Value_Offset} =
{<CustomTransformationKeyID>, 34736, 7,
*ptrToTiffTagContainingDoubleValues}.
NOTE: The spec has that "all key-values that are not of type SHORT are to be
stored in one of the following two tags, based on their format: ..."
GeoDoubleParamsTag (34736) or GeoAsciiParamsTag (34737).
Finally, regarding "Is it correct that multiple doubles have to be passed as
an array" -- this is my understanding.
Best Regards,
Noel
Christian Zietz wrote:
>
> Christian Zietz schrieb:
>
>> And that's exactly where I'm having problems right now. Whenever I try
>> to store multiple double values, an access violation occurs somewhere
>> inside GTIFKeySet.
>
> And a follow-up question/remark: Is it correct that multiple doubles
> have to be passed as an array? When I do something like
>
> double d[7];
> d[0] = 1; d[1] = 2; d[2] = 3; d[3] = 4;
> d[4] = 5; d[5] = 6; d[6] = 7.1;
> GTIFKeySet(gtif, MY_KEY, TYPE_DOUBLE, 7, d);
>
> everything works as expected. No access violation and listgeo confirms
> that the key is correctly set.
>
> Christian
> --
> Christian Zietz - CHZ-Soft - czietz at gmx.net
> WWW: http://www.chzsoft.com.ar/
> PGP/GnuPG-Key-ID: 0x6DA025CA
> _______________________________________________
> Geotiff mailing list
> Geotiff at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/geotiff
>
>
--
View this message in context: http://www.nabble.com/User-defined-datum%3A-Transformation-parameters-tp15656487p15749192.html
Sent from the GeoTIFF mailing list archive at Nabble.com.
More information about the Geotiff
mailing list