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
- 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
- 942 Bug Report
- 562 SDK
- 1.2K Suggestion Box
- 3.8K Technical Support
- 581 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 245 How I use Global Mapper
- 111 Global Mapper Forum Website
