Class: GeoScript::Geom::Point
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) ⇒ Point
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/geoscript/geom/point.rb', line 11
def initialize(*coords)
if coords.first.kind_of? JTSPoint
p = coords.first
else
c = Coordinate.new coords[0], coords[1]
c.z = coords[2] if coords[2]
p = GEOM_FACTORY.create_point c
end
super p.coordinate_sequence, GEOM_FACTORY
end
|
Instance Attribute Details
#bounds ⇒ Object
Returns the value of attribute bounds.
9
10
11
|
# File 'lib/geoscript/geom/point.rb', line 9
def bounds
@bounds
end
|
Instance Method Details
#buffer(dist) ⇒ Object
22
23
24
|
# File 'lib/geoscript/geom/point.rb', line 22
def buffer(dist)
Polygon.new super
end
|
#to_json ⇒ Object
34
35
36
|
# File 'lib/geoscript/geom/point.rb', line 34
def to_json
IO.write_json self
end
|
#to_wkb ⇒ Object
30
31
32
|
# File 'lib/geoscript/geom/point.rb', line 30
def to_wkb
IO.write_wkb self
end
|
#to_wkt ⇒ Object
26
27
28
|
# File 'lib/geoscript/geom/point.rb', line 26
def to_wkt
IO.write_wkt self
end
|