🌐 extend GeoRuby for geojson
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
README.textile
geojson.rb

README.textile

What is GeoJSON?

GeoJSON is a JSON representation of Simple Feature geometries defined by Open Geospatial Consortium (OGC). Simple features is a standard for representing geographic objects. You can read the GeoJSON spec at: http://geojson.org/geojson-spec.html

Using GeoJSON

Prerequisits

This GeoJSON is an extension to the GeoRuby gem.

  
    gem install nofxx-georuby
    git clone git@github.com:sabman/geojson.git
    cd geojson
    
    irb
    require 'geo_ruby'
    require 'geojson'
    geojson = '{ "type": "LineString", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] }'
    # read geometry
    geom = Geometry.from_geojson(geojson)
    # write geometry
    geom.to_json
  

You can see the tests for more examples