The utm Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The utm Reference Manual

This is the utm Reference Manual, version 1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 06:07:23 2022 GMT+0.

Table of Contents


1 Introduction

This library converts coordinates in latitude/longitude to UTM and from UTM to latitude/longitude.

Here's a sample run showing all off essentially all of the functionality.

    * (ql:quickload 'utm)
    To load "utm":
      Load 1 ASDF system:
        utm
    ; Loading "utm"
    
    (UTM)
    * (utm:lat-lon-to-utm 39.264657358 -105.396267073)
    
    465814.36361674307d0
    4346221.50650324d0
    13
    * (utm:utm-to-lat-lon 465814.36361674307d0 4346221.50650324d0 13)
    
    39.264654456410966d0
    -105.39627074290249d0
    * (utm:lat-lon-to-utm 39.264657358 -105.396267073 :ellipsoid "WGS72")
    
    465814.3743203891d0
    4346220.137838842d0
    13
    * (utm:utm-to-lat-lon 465814.3743203891d0 4346220.137838842d0 13 :ellipsoid "WGS72")
    
    39.26465442463012d0
    -105.39627074272353d0
    * (utm:ellipsoid-names)
    
    ("NAD83" "WGS84" "GRS80" "WGS72" "Australian1965" "Krasovsky1940"
     "International1924" "Hayford1909" "Clake1880" "Clarke1866" "Airy1830"
     "Bessel1841" "Everest1830")
    *

It is based heavily on information from Steve Dutch's UTM info website and UTM formula website.

It does not make any attempt to correct for the polar regions, so the results for those areas may be incorrect. To learn why UTM breaks at the polar regions, see here.

The calculations seem to be fairly accurate. Converting from lat/lon-> utm -> lat/lon returns the same latitude and longitude within 6 or 7 decimal places, which is probably more accurate than coordinates coming from a regular GPS unit. The results also match up with several online converters, such as this very good one on the University of Montana's website.


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 utm

Library for converting back and forth between latitude/longitude and UTM, supporting several datums.

Author

Jeremiah LaRocco <jeremiah_larocco@fastmail.com>

License

ISC (BSD-like)

Version

1.0

Source

utm.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Next: , Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.1 utm/utm.asd

Source

utm.asd.

Parent Component

utm (system).

ASDF Systems

utm.


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.2 utm/package.lisp

Dependency

license (file).

Source

utm.asd.

Parent Component

utm (system).

Packages

utm.


Previous: , Up: Lisp   [Contents][Index]

3.1.3 utm/utm.lisp

Dependency

package.lisp (file).

Source

utm.asd.

Parent Component

utm (system).

Public Interface
Internals

Previous: , Up: Files   [Contents][Index]

3.2 Static


Previous: , Up: Static   [Contents][Index]

3.2.1 utm/LICENSE

Source

utm.asd.

Parent Component

utm (system).


4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 utm

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


5.1.1 Ordinary functions

Function: decimal-to-deg-min-sec (decimal)

Convert degree, minute, second format to decimal.

Package

utm.

Source

utm.lisp.

Function: deg-min-sec-to-decimal (degree minute second)

Convert degree, minute, second format to decimal.nn

Package

utm.

Source

utm.lisp.

Function: ellipsoid-names ()

Return the names of all supported ellipsoids.

Package

utm.

Source

utm.lisp.

Function: lat-lon-to-utm (lat lon &key ellipsoid zone)

Convert a point given as latitude and longitude into UTM using the specified ellipsoid. The default ellipsoid is WGS84.

Package

utm.

Source

utm.lisp.

Function: utm-to-lat-lon (easting northing zone &key ellipsoid)

Convert a point given as UTM into latitude and longitude using the specified ellipsoid. The default ellipsoid is WGS84.

Package

utm.

Source

utm.lisp.


5.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.1 Constants

Constant: e0
Package

utm.

Source

utm.lisp.

Constant: k0
Package

utm.

Source

utm.lisp.

Constant: n0
Package

utm.

Source

utm.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.2 Special variables

Special Variable: *ellipsoids*
Package

utm.

Source

utm.lisp.


Previous: , Up: Internals   [Contents][Index]

5.2.3 Ordinary functions

Function: deg2rad (d)
Package

utm.

Source

utm.lisp.

Function: fill-ellipsoids ()

Fill the hash table of supported ellipsoids.

Package

utm.

Source

utm.lisp.

Function: rad2deg (r)
Package

utm.

Source

utm.lisp.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts