Global Mapper v26.0

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.

Tagged: