Skip to content

sabman/geojson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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

About

🌐 extend GeoRuby for geojson

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published