Class: GeographicItem::Polygon
- Inherits:
-
GeographicItem
- Object
- GeographicItem
- GeographicItem::Polygon
- Defined in:
- app/models/geographic_item/polygon.rb
Overview
Polygon definition…
Constant Summary collapse
- SHAPE_COLUMN =
:polygon
Instance Method Summary collapse
- #keystone_error_box ⇒ Object
- #rendering_hash ⇒ Hash
-
#st_start_point ⇒ RGeo::Point
First point in the polygon.
-
#to_a ⇒ Array
Arrays of points.
Instance Method Details
#keystone_error_box ⇒ Object
22 23 24 |
# File 'app/models/geographic_item/polygon.rb', line 22 def keystone_error_box geo_object end |
#rendering_hash ⇒ Hash
18 19 20 |
# File 'app/models/geographic_item/polygon.rb', line 18 def rendering_hash polygon_to_hash(self.polygon) end |
#st_start_point ⇒ RGeo::Point
Returns first point in the polygon.
13 14 15 |
# File 'app/models/geographic_item/polygon.rb', line 13 def st_start_point geo_object.exterior_ring.point_n(0) end |
#to_a ⇒ Array
Returns arrays of points.
8 9 10 |
# File 'app/models/geographic_item/polygon.rb', line 8 def to_a polygon_to_a(self.polygon) end |