Class: Geos::MultiLineString

Inherits:
GeometryCollection show all
Defined in:
lib/geos/multi_line_string.rb

Instance Method Summary collapse

Methods inherited from GeometryCollection

#[], #as_json, #each, #last, #to_georss, #to_kml

Instance Method Details

#to_geojsonable(options = {}) ⇒ Object Also known as: as_geojson



4
5
6
7
8
9
10
11
# File 'lib/geos/multi_line_string.rb', line 4

def to_geojsonable(options = {})
  {
    :type => 'MultiLineString',
    :coordinates => self.to_a.collect { |linestring|
      linestring.coord_seq.to_a
    }
  }
end