Class: GeoRuby::GeoJSONParser
- Inherits:
-
Object
- Object
- GeoRuby::GeoJSONParser
- Includes:
- SimpleFeatures
- Defined in:
- lib/geo_ruby/geojson.rb
Overview
GeoJSON main parser
Constant Summary
Constants included from SimpleFeatures
SimpleFeatures::DEFAULT_SRID, SimpleFeatures::GEORSS_NS, SimpleFeatures::GML_NS, SimpleFeatures::KML_NS, SimpleFeatures::M_MASK, SimpleFeatures::SRID_MASK, SimpleFeatures::W3CGEO_NS, SimpleFeatures::Z_MASK
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.
74 75 76 |
# File 'lib/geo_ruby/geojson.rb', line 74 def geometry @geometry end |
Instance Method Details
#parse(geojson, srid = DEFAULT_SRID) ⇒ Object
76 77 78 79 80 |
# File 'lib/geo_ruby/geojson.rb', line 76 def parse(geojson, srid = DEFAULT_SRID) @geometry = nil geohash = JSON.parse(geojson) parse_geohash(geohash, srid) end |