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.
65 66 67 |
# File 'lib/geo_ruby/geojson.rb', line 65 def geometry @geometry end |
Instance Method Details
#parse(geojson, srid = DEFAULT_SRID) ⇒ Object
67 68 69 70 71 |
# File 'lib/geo_ruby/geojson.rb', line 67 def parse(geojson, srid=DEFAULT_SRID) @geometry = nil geohash = JSON.parse(geojson) parse_geohash(geohash, srid) end |