Script Error - Empty Bounds
Hi,
I'm trying to write a simple script that will convert a single point from WGS84 to custom state plane projection.
When I run this script, I get a "ERROR: Export bounds empty for EXPORT_VECTOR command." error, but it's not clear to me which bounds option I should use - it's just one point in an otherwise empty workspace.
Here's my draft script (without the file paths):
// Define the input and output file paths
// Load the input file
IMPORT_ASCII FILENAME="%INPUT_FILE%" LAYER_DESC="Import_Points" PROJ=EPSG:4326 ELEV_UNITS=METERS TYPE=POINT_ONLY COORD_DELIM=AUTO
//IMPORT_ASCII FILENAME=".\GPSCOORDS.csv" TYPE=POINT_ONLY COORD_DELIM=AUTO COORD_ORDER=Y_FIRST INC_COORD_LINE_ATTRS=Yes SKIP_COLUMNS=1 SKIP_ROWS=1 PROJ=EPSG:4326 ELEV_UNITS=METERS
// Apply the custom projection
LOAD_PROJECTION PROJ="%PROJECTION_FILE%"
// Save the converted coordinates
EXPORT_VECTOR FILENAME="%OUTPUT_FILE%" EXPORT_LAYER="Import_Points" TYPE=CSV EXPORT_HEADER=NO ADD_LAT_LON=YES EXPORT_ELEV=YES COORD_DELIM=COMMA
// End of script
Ideally, there would be a function in GMS or PY that replicates the "Coordinate Converter" tool in the application: I just want to pass in a point value in one coordinate system and pass out the point in another coordinate system.
Categories
- 12.8K All Categories
- 5.7K Features Discussion
- 345 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 636 GM Script Language
- 54 User Scripts
- 114 GPS Features
- 417 Projection Questions
- 826 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 178 Announcement and News
- 913 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 569 Other Discussion
- 131 GIS Data Sources
- 27 Global Mapper Showcase
- 238 How I use Global Mapper
- 107 Global Mapper Forum Website