class GeoScript::Geom::LinearRing

Attributes

bounds[RW]

Public Class Methods

new(*coords) click to toggle source
Calls superclass method
# File lib/geoscript/geom/linearring.rb, line 11
def initialize(*coords)
  if coords.size == 1
    super(coords.first.coordinate_sequence) if coords.first.kind_of? LinearRing
  else
    line_string = LineString.new *coords
    super(line_string.coordinate_sequence, GEOM_FACTORY)
  end
end

Public Instance Methods

buffer(dist) click to toggle source
Calls superclass method GeoScript::Geom::buffer
# File lib/geoscript/geom/linearring.rb, line 20
def buffer(dist)
  Polygon.new super
end
to_json() click to toggle source
# File lib/geoscript/geom/linearring.rb, line 32
def to_json
  IO.write_json self
end
to_wkb() click to toggle source
# File lib/geoscript/geom/linearring.rb, line 28
def to_wkb
  IO.write_wkb self
end
to_wkt() click to toggle source
# File lib/geoscript/geom/linearring.rb, line 24
def to_wkt
  IO.write_wkt self
end