Class: GeoScript::Geom::LinearRing
Constant Summary
GEOM_FACTORY, PREP_FACTORY
Instance Attribute Summary collapse
Instance Method Summary
collapse
buffer, enhance, from_wkt, get_bounds, prepare, simplify, to_wkt
Constructor Details
#initialize(*coords) ⇒ LinearRing
Returns a new instance of LinearRing.
11
12
13
14
15
16
17
18
|
# 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
|
Instance Attribute Details
#bounds ⇒ Object
Returns the value of attribute bounds.
9
10
11
|
# File 'lib/geoscript/geom/linearring.rb', line 9
def bounds
@bounds
end
|
Instance Method Details
#buffer(dist) ⇒ Object
20
21
22
|
# File 'lib/geoscript/geom/linearring.rb', line 20
def buffer(dist)
Polygon.new super
end
|
#to_json ⇒ Object
32
33
34
|
# File 'lib/geoscript/geom/linearring.rb', line 32
def to_json
IO.write_json self
end
|
#to_wkb ⇒ Object
28
29
30
|
# File 'lib/geoscript/geom/linearring.rb', line 28
def to_wkb
IO.write_wkb self
end
|
#to_wkt ⇒ Object
24
25
26
|
# File 'lib/geoscript/geom/linearring.rb', line 24
def to_wkt
IO.write_wkt self
end
|