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.9K All Categories
- 5.8K Features Discussion
- 349 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 651 GM Script Language
- 55 User Scripts
- 115 GPS Features
- 420 Projection Questions
- 834 Raster Data
- 1.4K Vector Data
- 6.6K Support
- 181 Announcement and News
- 935 Bug Report
- 561 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 578 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 244 How I use Global Mapper
- 109 Global Mapper Forum Website

