A command line tool for OS X to get your geographic coordinates using the CoreLocation framework; forked from WhereAmI
Objective-C
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 5 commits ahead of robmathers:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
WhereAmI-GeoJSON.xcodeproj
WhereAmI
.gitignore
README.md

README.md

WhereAmI-GeoJson

A command line tool to get your geographic coordinates in GeoJson format using the OS X CoreLocation framework.

Forked from WhereAmI.

Usage

Open with Finder to execute, or in the terminal. If it can determine a location, it will output current location (longitude, latitude) in GeoJson format (whereas the original WhereAmI displays the data in plain text).

WhereAmI-GeoJson tries to get a recent location, and will not display one if it is more than a minute old (to avoid inaccurate results from CoreLocation's cached data). If it cannot get location data, it will quit and print an error message.

Example output:

{
  "type" : "Feature",
  "geometry" : {
    "type" : "Point",
    "coordinates" : [
      5.26,
      52.30276
    ]
  },
  "properties" : {
    "name" : "Timestamp: 17\/06\/14 20:34:08 GMT+2"
  }
}

You can use GeoJSONLint to test the output.

Notes

This is a quick and dirty example. I make no guarantees or warranties as to its accuracy, stability or compatibility (it should work with 10.7 and 10.8, but I have only tested it on 10.7). Feel free to do with it as you wish.