Differentiate between GeoTiff and Tiff

Osei
Osei Global Mapper UserTrusted User
edited August 2009 in SDK
We are having problems with differentaiting between GeoTiff and Tiff files. In Global Mapper 9 app, a GeoTiff file is loaded without showing the Image Rectifier but loading a Tiff file causes the Image Rectifier to come up.
We want to implement similar functionality since we already implemented our own Image Rectifier.
When we load a GeoTiff file, we get the GM_LayerInfo_t and mTypeName is set to "GeoTiff file". Unfortunately, loading a Tiff file also has the same mTypeName. As a result, we are not able to say when our Image Rectifier should show.

We tried the GCP list and they both have 4 GCPs and both GCP lists had seemingly valid values.
We also tried with the MetaData list and didn't see much differences.

Can you give us an idea how we can separate Tiff from GeoTiff?

Thanks in advance

Comments

  • global_mapper
    global_mapper Administrator
    edited August 2009
    What you need to do is load the file with the GM_LoadFlags_UseDefaultPos flag. Then after load, call GM_GetLayerInfo and check the mUsedDefaultPos flag. If that is set the image would have needed rectified and thus didn't contain any position information and you'll know it wasn't a GeoTIFF.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com