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
- 13K All Categories
- 5.8K Features Discussion
- 349 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 421 Projection Questions
- 835 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 181 Announcement and News
- 939 Bug Report
- 562 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 579 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 244 How I use Global Mapper
- 110 Global Mapper Forum Website
