Skip to content

maroofi/coordinates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

coordinates

// Convert UTM to LatLong and vice versa.

Usage:

<?php  

  require_once("coordinates.php");   

  echo ll2utm(36.311665575277935,59.55385813725379);   

  echo "<br/>";   
  
  echo utm2ll(729286.9550018794,4021544.8279992654,40,true);   
  
?>   
/*  
  output:  
  {"success":true,"attr":{"x":729286.95500188,"y":4021544.8279993,"zone":40,"aboveEquator":true}}  
  {"success":true,"attr":{"lat":36.311665575271,"lon":59.553858137274}}  
*/  

Functions

utm2ll() --> This function convert UTM to Lat and long.

ll2utm() --> This function convert LatLong to UTM.

Reference: based on the javascript code: http://home.hiwaay.net/~taylorc/toolbox/geography/geoutm.html

About

Convert UTM to LatLong and vice versa

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages