testutm
Overview
testutm is an interactive command-line calculator for testing forward (geographic to grid) and inverse (grid to geographic) coordinate transformations across the three standard OMG projectionsβUTM, New Brunswick Double Stereographic (nbstereo), and Mercatorβand six reference ellipsoids (WGS84, NAD27, CLK66, AGD84, Sphere, ATS77).
Syntax & CLI Options
testutm
All projection parameters and coordinate pairs are prompted interactively from stdin.
How It Works
- Interactive Configuration:
- Prompts for the map projection:
1: UTM (geoutm/utmgeo, requires central meridianmerid).2: New Brunswick Stereographic (nbstereo_init,nbstereo/nbstereo_inv).3: Mercator (merc_init,mercator/inv_merc; prompts forscale,proj_lat,origin_lat, andorigin_lon).
- Prompts for input angle format:
0fordegrees minutesor1fordecimal degrees. - Prompts for the reference ellipsoid:
(1) WGS84,(2) NAD27,(3) CLK66,(4) AGD84,(5) Sphere,(6) ATS77.
- Prompts for the map projection:
- Continuous Conversion Loop:
- Repeatedly prompts whether to convert Geo to Grid (
1) or Grid to Geo (2), reads the input coordinates fromstdin, executes the selected forward or inverse projection routine, and prints the resulting coordinates tostdout.
- Repeatedly prompts whether to convert Geo to Grid (
Examples
Run the interactive coordinate transformation calculator
testutm
Example interactive session (WGS84 UTM forward conversion at central meridian -69Β°):
UTM (1) or NB stereo (2) or Merc (3)?
1
degrees and minutes (0) or decimal degrees (1) ?
1
which ellipsoid (1) WGS84 (2) NAD27 (3) CLK66 (4) AGD84 (5) Sphere (6) ATS77
1
Geo to UTM (1) or UTM to Geo (2) ?
1
input lat (decdeg) lon (decdeg) merid
45.25 -66.05 -69.0
Workflow Context
- Batch Counterparts:
convertutm(batch file conversion between Lat/Lon, UTM, and NB Stereographic) andproject(batch Mercator projection).