Class: CloudMade::Geometry
- Inherits:
-
Object
- Object
- CloudMade::Geometry
show all
- Defined in:
- lib/cloudmade/geometry.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.parse(data) ⇒ Object
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/cloudmade/geometry.rb', line 21
def parse(data)
return nil if data == nil
case data['type'].downcase
when 'point' then return Point.new(data['coordinates'])
when 'line' then return Line.new(data['coordinates'])
when 'multilinestring' then return MultiLine.new(data['coordinates'])
when 'polygon' then return Polygon.new(data['coordinates'])
when 'multipolygon' then return MultiPolygon.new(data['coordinates'])
end
end
|
Instance Method Details
#wkt_helper ⇒ Object
34
35
36
|
# File 'lib/cloudmade/geometry.rb', line 34
def wkt_helper
raise 'Not implemented'
end
|