Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
judgej committed Jul 3, 2014
1 parent 962b098 commit 21193f7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ The Mgrs class extends Utm with its set of reference conversion methods.
$mgrs = Mgrs::fromGridReference($mgrs_grid_reference);

// To a MGRS grid reference string.
// Template is optional.
// The accuracy is optional 0 to 5, defaulting to 5.
$grid_reference = $mgrs->toGridReference($accuracy);
$grid_reference = $mgrs->toGridReference($template, $accuracy);

// To a single lat/long coordinate.
// $accuracy is optional, and defaults to the accuracy of the current coordinate.
Expand All @@ -86,4 +87,12 @@ The Mgrs class extends Utm with its set of reference conversion methods.
// The accuracy is optional 0 to 5, defaulting to 5.
$square = $mgrs->toSquare($accuracy);

The MGRS grid reference formatting fields are:

* %z Zone number
* %l Zone letter
* %k 100km zone ID (two letters)
* %e Easting, to the current accuracy
* %n Northing, to the current accuracy

Instantiating a Utm, Mgrs, LatLong or Square class always requires a valid coordiate in some form.

0 comments on commit 21193f7

Please sign in to comment.