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.5K All Categories
- 5.5K Features Discussion
- 314 Downloading Imagery
- 1.3K Elevation Data
- 377 Georeferencing Imagery Discussion
- 611 GM Script Language
- 50 User Scripts
- 112 GPS Features
- 397 Projection Questions
- 803 Raster Data
- 1.3K Vector Data
- 6.5K Support
- 161 Announcement and News
- 893 Bug Report
- 557 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 542 Other Discussion
- 128 GIS Data Sources
- 26 Global Mapper Showcase
- 229 How I use Global Mapper
- 104 Global Mapper Forum Website