help with scripting - IMPORT FILENAME=variable
benkelman
Global Mapper User
Sorry if I should have been able to resolve this on my own, but I can't seem to find what I need.
I need to process a batch of KML files, but haven't found a way to either
a) call "Batch Convert/Reproject" from a script, or
b) pass in "inputfilename" as a variable.
The only solution I can think of is to build an external script (DOS, Python, PERL) that copies each input file to "temp.KML", then call a GMS script that reads & processes "temp.KML" to output "temp.SHP", then use my external script to rename "temp.SHP" before proceeding.
Am I missing a tutorial or FAQ that addresses this?
Thanks
Cody Benkelman
I need to process a batch of KML files, but haven't found a way to either
a) call "Batch Convert/Reproject" from a script, or
b) pass in "inputfilename" as a variable.
The only solution I can think of is to build an external script (DOS, Python, PERL) that copies each input file to "temp.KML", then call a GMS script that reads & processes "temp.KML" to output "temp.SHP", then use my external script to rename "temp.SHP" before proceeding.
Am I missing a tutorial or FAQ that addresses this?
Thanks
Cody Benkelman
Comments
-
Cody,
You aren't missing anything, the GM scripting language does not have any support for variables, so your approach of creating an external script to do the copying as you describe is the best approach. Or you could create an external script to generate a single Global Mapper script to do all of the conversions that you want all at once.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@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