Class: GeoRuby::GeojsonParser
- Inherits:
-
Object
- Object
- GeoRuby::GeojsonParser
- Defined in:
- lib/geo_ruby/geojson.rb
Instance Attribute Summary collapse
-
#geometry ⇒ Object
readonly
Returns the value of attribute geometry.
Instance Method Summary collapse
Instance Attribute Details
#geometry ⇒ Object (readonly)
Returns the value of attribute geometry.
76 77 78 |
# File 'lib/geo_ruby/geojson.rb', line 76 def geometry @geometry end |
Instance Method Details
#parse(geojson, srid = DEFAULT_SRID) ⇒ Object
78 79 80 81 82 |
# File 'lib/geo_ruby/geojson.rb', line 78 def parse(geojson, srid=DEFAULT_SRID) @geometry = nil geohash = JSON.parse(geojson) parse_geohash(geohash, srid) end |