Specify file prj on import without being prompted

MorganRS
Global Mapper UserTrusted User
I'm trying to decipher the GM scripting language reference doc on how to specify a projection for a file that does not have a prj file. The scripting reference page gives no example on the correct format. I'm trying this:
GLOBAL_MAPPER_SCRIPT VERSION=1.00
IMPORT FILENAME="G:\Products\Garmin\Premium\OK\OK_TRANSPORTATION.MP" EPSG:4326
since the reference doc only states :
since the reference doc only states :
- EPSG Code - the value is an EPSG code, either just the raw code, or a code with EPSG: in front of it, like 'EPSG:4326'
Answers
-
Hello,The best way to do it is to use DEFINE_PROJ and END_DEFINE_PROJ to define your import projection 'before' your import. You give it a name (or it already has one), and then specify it using that name in your import command. Then it's in the script for any import to find just by calling it's name. Like:GLOBAL_MAPPER_SCRIPT VERSION=1.00DEFINE_PROJ PROJ_NAME="GEO_WGS84"Projection GEOGRAPHICDatum WGS84Zunits NOUnits DDXshift 0.000000Yshift 0.000000Parameters0 0 0.000 /* longitude of center of projectionEND_DEFINE_PROJIMPORT FILENAME="G:\Products\Garmin\Premium\OK\OK_TRANSPORTATION.MP" PROJ_NAME="GEO_WGS84"The example above should be good for EPSG 4326Hope that helps,Mark
-
Perfect! Thank you Mark. I was trying the DEFINE_PROJ command but wasn't putting it the correct place I guess.
Categories
- 12.4K All Categories
- 5.4K Features Discussion
- 314 Downloading Imagery
- 1.3K Elevation Data
- 377 Georeferencing Imagery Discussion
- 603 GM Script Language
- 49 User Scripts
- 112 GPS Features
- 394 Projection Questions
- 800 Raster Data
- 1.3K Vector Data
- 6.5K Support
- 161 Announcement and News
- 890 Bug Report
- 556 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 537 Other Discussion
- 128 GIS Data Sources
- 26 Global Mapper Showcase
- 224 How I use Global Mapper
- 104 Global Mapper Forum Website