Module: Factory::Instance

Defined in:
lib/rgeo/geo_json/conversion_methods.rb

Instance Method Summary collapse

Instance Method Details

#parse_geojson(input) ⇒ Object

Parses a GeoJSON String/Hash, or an IO object from which the JSON string is read and returns the corresponding feature. Returns nil if unable to parse.



45
46
47
# File 'lib/rgeo/geo_json/conversion_methods.rb', line 45

def parse_geojson(input)
  GeoJSON.decode(input, geo_factory: self)
end