Git Product home page Git Product logo

utm's 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.

utm's People

Contributors

jl2 avatar jkcunningham avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.