Differentiate between GeoTiff and Tiff
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
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
-
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
Categories
- 12.9K All Categories
- 5.7K Features Discussion
- 346 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 645 GM Script Language
- 54 User Scripts
- 115 GPS Features
- 419 Projection Questions
- 829 Raster Data
- 1.4K Vector Data
- 6.6K Support
- 180 Announcement and News
- 926 Bug Report
- 561 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 575 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 242 How I use Global Mapper
- 108 Global Mapper Forum Website