Class: CloudMade::Line
Instance Attribute Summary collapse
-
#points ⇒ Object
Returns the value of attribute points.
Instance Method Summary collapse
-
#initialize(coords) ⇒ Line
constructor
A new instance of Line.
- #to_s ⇒ Object
- #to_wkt ⇒ Object
- #wkt_helper ⇒ Object
Methods inherited from Geometry
Constructor Details
Instance Attribute Details
#points ⇒ Object
Returns the value of attribute points.
78 79 80 |
# File 'lib/cloudmade/geometry.rb', line 78 def points @points end |
Instance Method Details
#to_s ⇒ Object
84 85 86 |
# File 'lib/cloudmade/geometry.rb', line 84 def to_s "Line(#{@points.join(',')})" end |
#to_wkt ⇒ Object
88 89 90 |
# File 'lib/cloudmade/geometry.rb', line 88 def to_wkt "LINESTRING #{wkt_helper}" end |
#wkt_helper ⇒ Object
92 93 94 |
# File 'lib/cloudmade/geometry.rb', line 92 def wkt_helper "(#{@points.map{ |point| point.wkt_helper }.join(', ')})" end |