Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding readme notes about parsing from a DMS string

  • Loading branch information...
commit d2502223fb51fe14d896fc5a96919e22168e860e 1 parent 05c46ae
@nateklaiber nateklaiber authored
Showing with 24 additions and 0 deletions.
  1. +24 −0 README.md
View
24 README.md
@@ -72,6 +72,30 @@ conversion.to_s
=> "157 deg 26' 27\" W"
```
+### Parsing from a DMS string
+```ruby
+dms_string = "77 deg 8 42.00 W"
+
+parser = GeoPosition::Parser::Dms.new(dms_string)
+
+parser.degrees
+=> 77
+
+parser.minutes
+=> 8
+
+parser.seconds
+=> 42.0
+
+parser.direction
+=> "W"
+
+parser.to_hash
+=> {:degrees=>77, :minutes=>8, :seconds=>42.0, :direction=>"W"}
+```
+
+
+
## Todo
* Add a command line component
Please sign in to comment.
Something went wrong with that request. Please try again.