Class: Mongoid::Geospatial::Line
- Inherits:
-
GeometryField
show all
- Defined in:
- lib/mongoid_geospatial/fields/line.rb,
lib/mongoid_geospatial/wrappers/rgeo.rb,
lib/mongoid_geospatial/wrappers/georuby.rb
Instance Method Summary
collapse
#bounding_box, #center_point, demongoize, #radius, #radius_sphere
Instance Method Details
#to_geo ⇒ Object
22
23
24
|
# File 'lib/mongoid_geospatial/wrappers/georuby.rb', line 22
def to_geo
GeoRuby::SimpleFeatures::LineString.from_coordinates(self)
end
|
#to_rgeo ⇒ Object
28
29
30
|
# File 'lib/mongoid_geospatial/wrappers/rgeo.rb', line 28
def to_rgeo
RGeo::Geographic.spherical_factory.line_string points
end
|