International Date Line bug + associated scripting bug
I have a number of maps that touch the International Date Line and have collars that go beyond. GM seems to get confused. It incorrectly handles a sheet that is 168E - 180E as though it is 180W - 180E.
To recreate the problem visually:
1. Open any base layer that sets the projection to WGS84. I used Google Aerial.
2. Open the sheet and manually remove the collar. I used the ranges W=168, E=180, S=60, N=64.
3. Export the Layer. Bug 1: Notice how the Export bounds default to 180W - 180E, ignoring what the .map file calibration says.
4. OK, so I can manually set the export bounds and the result is what I want.
BUT...
5. Bug 2: In a script, the the export bounds are ignored. So manually is the only way to process those maps that touch the date line. It's a slow process with the stack of maps I have.
No need to load Google Aerial in a script - just set the projection. Here is the script which explicitly sets the export bounds.
LOAD_PROJECTION PROJ="EPSG:3857"
IMPORT FILENAME="001m--p59_60.gif" TYPE=AUTO ANTI_ALIAS=NO AUTO_CONTRAST=NO CLIP_COLLAR=LAT_LON CLIP_COLLAR_BOUNDS="168.0,60.0,180.0,64.0" TEXTURE_MAP=NO
EXPORT_RASTER FILENAME="001m_P_59_60.tif" TYPE=GEOTIFF PALETTE=JPEG LAT_LON_BOUNDS="168.0,60.0,180.0,64.0"
The result of this script is a compressed image, still influenced by GM thinking the sheet stretches 180W - 180E.
I asked a colleague to check, and he had the same problem. I am on GM 22.0, he was on GM 19.
The original map is here if you want to try it. This forum software won't allow .map files to be uploaded so I've named it 001m--p59_60.map.txt. Remove the ".txt" to use it.
What does Blue Marble Support have to say?
"
Maybe if someone else confirmed what I'm reporting they'd acknowledge the issue.
To recreate the problem visually:
1. Open any base layer that sets the projection to WGS84. I used Google Aerial.
2. Open the sheet and manually remove the collar. I used the ranges W=168, E=180, S=60, N=64.
3. Export the Layer. Bug 1: Notice how the Export bounds default to 180W - 180E, ignoring what the .map file calibration says.
4. OK, so I can manually set the export bounds and the result is what I want.
BUT...
5. Bug 2: In a script, the the export bounds are ignored. So manually is the only way to process those maps that touch the date line. It's a slow process with the stack of maps I have.
No need to load Google Aerial in a script - just set the projection. Here is the script which explicitly sets the export bounds.
GLOBAL_MAPPER_SCRIPT VERSION="1.00"
LOAD_PROJECTION PROJ="EPSG:3857"
IMPORT FILENAME="001m--p59_60.gif" TYPE=AUTO ANTI_ALIAS=NO AUTO_CONTRAST=NO CLIP_COLLAR=LAT_LON CLIP_COLLAR_BOUNDS="168.0,60.0,180.0,64.0" TEXTURE_MAP=NO
EXPORT_RASTER FILENAME="001m_P_59_60.tif" TYPE=GEOTIFF PALETTE=JPEG LAT_LON_BOUNDS="168.0,60.0,180.0,64.0"
The result of this script is a compressed image, still influenced by GM thinking the sheet stretches 180W - 180E.
I asked a colleague to check, and he had the same problem. I am on GM 22.0, he was on GM 19.
The original map is here if you want to try it. This forum software won't allow .map files to be uploaded so I've named it 001m--p59_60.map.txt. Remove the ".txt" to use it.
What does Blue Marble Support have to say?
"
- Reset GM to default settings. Go to Configuration > General tab > General and click Restore Default Settings
- Clean install. A clean uninstall and reinstall of Global Mapper may fix the problem as well.
"Maybe if someone else confirmed what I'm reporting they'd acknowledge the issue.
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website