Class: Mongoid::Geospatial::Polygon

Inherits:
GeometryField show all
Defined in:
lib/mongoid_geospatial/wrappers/rgeo.rb,
lib/mongoid_geospatial/fields/polygon.rb,
lib/mongoid_geospatial/wrappers/georuby.rb

Instance Method Summary collapse

Methods inherited from GeometryField

#bounding_box, #center_point, demongoize, #radius, #radius_sphere

Methods inherited from Array

#to_xy

Instance Method Details

#to_geoObject



44
45
46
47
# File 'lib/mongoid_geospatial/wrappers/rgeo.rb', line 44

def to_geo
  ring = RGeo::Geographic.spherical_factory.linear_ring points
  RGeo::Geographic.spherical_factory.polygon ring
end