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

