Problem with reproject script
Steve Sharp
Global Mapper User
Hello,
So I've written a script to reproject some imagery from UTM to VT State Plane Meters NAD83. I've done this before using and earlier version of GM. I've made changes to the script to do some things differently, so maybe I broke something. Anyway, I use the LOAD_PROJECTION PROJ to set the projection to VT State Plane Meters NAD83 using a PRJ file (attached along with script). The IMPORT should then import the GeoTIFF (which is in UTM) and reproject it upon EXPORT to VT State Plane Meters NAD83. But it doesn't work. What am I doing wrong?
Thanks for the help.
So I've written a script to reproject some imagery from UTM to VT State Plane Meters NAD83. I've done this before using and earlier version of GM. I've made changes to the script to do some things differently, so maybe I broke something. Anyway, I use the LOAD_PROJECTION PROJ to set the projection to VT State Plane Meters NAD83 using a PRJ file (attached along with script). The IMPORT should then import the GeoTIFF (which is in UTM) and reproject it upon EXPORT to VT State Plane Meters NAD83. But it doesn't work. What am I doing wrong?
Thanks for the help.
Comments
-
Stick your LOAD_PROJECTION call as the first call in your loop. The UNLOAD_ALL call will also reset the projection to unset so it will take the projection of the next loaded file, so your script would work for the first file, but then not reproject anything after that.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com -
Mike, thanks for the quick response. So I made the change as suggested and tried it again. Unfortunately it continues to fail (doesn't reproject the imagery). I did the same process manually via the GUI and it works, so I don't believe there is an issue with the PRJ file and original imagery. The POLYGON_CROP_FILE option is working too (just to BBOX as specified). So its just the projection parameter that fails.
Files here (orig and output)
Refer to *_VCS as the output
http://www.vcgi.org/pub/adhoc/temp/Gmapper/
I'm a bit confused by the deprecation of LOAD_PROJECTION options. Am I using the proper syntax?
Any chance you could run this on your end against http://www.vcgi.org/pub/adhoc/temp/Gmapper/m_4207209_ne_18_1_20110919.tif to see if you can get it to work?
Thanks again. -
The script looks ok, I'm downloading now to see if I can try it myself. What version of Global Mapper are you using? If you have an older one the new LOAD_PROJECTION generic PROJ parameter that is more flexible than the old ones wouldn't work, you would need to use the FILENAME parameter. The old-style parameters still work, the newer releases just support using the PROJ parameter for everything and having GM automatically figure out how you are specifying the projection.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com -
I'm running ver 13.
-
Which v13 though? I think the LOAD_PROJECTION change may have been in v13.1. Try getting the latest from the links below and see if that works:
32-bit: http://www.globalmapper.com/downloads/global_mapper_setup.exe
64-bit: http://www.globalmapper.com/downloads/global_mapper_setup_64bit.exe
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com -
Mike, I was running 13.0. I upgraded to 13.2 and ran the script again. It worked! I guess it was the PROJ keyword change. Thanks for the help!
My only suggestions is that the GM help system distinguish between minor versions (eg 13.0 vs 13.1 vs 13.2). As its currently structured you only have doc for major versions (11, 12, 13, etc). For example I was looking at this help linked from the 13.0 GUI and it indicated that I should be using PROJ keyword (others having been depricated), which as you stated wasn't implemented until 13.1.
http://www.globalmapper.com/helpv13/Help_Main.html
Should be
13.0 = http://www.globalmapper.com/helpv13.0/Help_Main.html
13.2 http://www.globalmapper.com/helpv13.2/Help_Main.html
Anyway, thanks again. Greatly appreciated.
Steve -
Steve,
It can be a bit confusing as so many things are added between minor releases in Global Mapper. Even the daily builds that many get have lots of changes that aren't even in documentation yet. We just keep documentation for each major version since users can update to the latest point release of any major version for free, so once v13.1 or v13.2 comes out there isn't any reason (except for some weird IT department rules) to stick with v13.0.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com
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