blob: 3f0dd0031a87e148fa0b2b2bb11513a8ad8f1cbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
module Chouette::Geometry::GeneralPresenter
def to_line_string_feature( stop_areas)
points = stop_areas.collect(&:geometry).compact
GeoRuby::SimpleFeatures::LineString.from_points(points)
end
def to_multi_point_feature( stop_areas)
points = stop_areas.collect(&:geometry).compact
GeoRuby::SimpleFeatures::MultiPoint.from_points( points )
end
def to_point_feature( stop_area)
return nil unless stop_area.longitude && stop_area.latitude
GeoRuby::SimpleFeatures::Point.from_lon_lat( stop_area.longitude, stop_area.latitude, 4326)
end
end
|