Class: GeoRuby::SimpleFeatures::Polygon
- Inherits:
-
Object
- Object
- GeoRuby::SimpleFeatures::Polygon
- Defined in:
- lib/geojson.rb
Instance Method Summary collapse
Instance Method Details
#as_json(options = nil) ⇒ Object
74 75 76 77 78 |
# File 'lib/geojson.rb', line 74 def as_json( = nil) coords = self.collect {|ring| ring.points.collect {|point| [point.x, point.y] } } {:type => "Polygon", :coordinates => coords}.as_json() end |