class GeoScript::Geom::MultiLineString

Attributes

bounds[RW]

Public Class Methods

new(*line_strings) click to toggle source
Calls superclass method
# File lib/geoscript/geom/multilinestring.rb, line 10
def initialize(*line_strings)
  strings = []

  if line_strings.first.kind_of? JTSMultiLineString
    multi_line_string_geom = line_strings.first
    for i in range(0...multi_line_string_geom.num_geometries)
      strings << multi_line_string_geom.get_geometry_n(i)
    end
  else
    line_strings.each do |line_string|
      if line_string.kind_of? LineString
        strings << line_string
      else
        strings << LineString.new(*line_string)
      end
    end
  end

  super(strings.to_java(com.vividsolutions.jts.geom.LineString), GEOM_FACTORY)
end

Public Instance Methods

buffer(dist) click to toggle source
Calls superclass method GeoScript::Geom::buffer
# File lib/geoscript/geom/multilinestring.rb, line 31
def buffer(dist)
  Polygon.new super
end
to_json() click to toggle source
# File lib/geoscript/geom/multilinestring.rb, line 43
def to_json
  IO.write_json self
end
to_wkb() click to toggle source
# File lib/geoscript/geom/multilinestring.rb, line 39
def to_wkb
  IO.write_wkb self
end
to_wkt() click to toggle source
# File lib/geoscript/geom/multilinestring.rb, line 35
def to_wkt
  IO.write_wkt self
end