Class: Chouette::Geometry::RoutePresenter

Inherits:
Object
  • Object
show all
Includes:
GeneralPresenter
Defined in:
app/presenters/chouette/geometry/route_presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(route) ⇒ RoutePresenter

Returns a new instance of RoutePresenter.



4
5
6
# File 'app/presenters/chouette/geometry/route_presenter.rb', line 4

def initialize(route)
  @route = route
end

Instance Method Details

#geometryObject

return route geometry based on BoardingPosition or Quay



16
17
18
# File 'app/presenters/chouette/geometry/route_presenter.rb', line 16

def geometry
  to_line_string_feature( @route.stop_areas.with_geometry )
end

#stop_areas_geometryObject

return route’s stop_areas cloud geometry



10
11
12
# File 'app/presenters/chouette/geometry/route_presenter.rb', line 10

def stop_areas_geometry
  to_multi_point_feature( @route.stop_areas.with_geometry )
end