Class: GeographicItem::MultiPolygon

Inherits:
GeographicItem
  • Object
show all
Defined in:
app/models/geographic_item/multi_polygon.rb

Overview

Multi polygon definition…

Constant Summary collapse

SHAPE_COLUMN =
:multi_polygon

Instance Method Summary collapse

Instance Method Details

#rendering_hashHash

Returns:

  • (Hash)


18
19
20
# File 'app/models/geographic_item/multi_polygon.rb', line 18

def rendering_hash
  multi_polygon_to_hash(self.multi_polygon)
end

#st_start_pointRGeo::Point

Returns first point in first polygon

Returns:

  • (RGeo::Point)

    first point in first polygon



13
14
15
# File 'app/models/geographic_item/multi_polygon.rb', line 13

def st_start_point
  geo_object[0].exterior_ring.point_n(0)
end

#to_aArray

Returns arrays of points

Returns:

  • (Array)

    arrays of points



8
9
10
# File 'app/models/geographic_item/multi_polygon.rb', line 8

def to_a
  multi_polygon_to_a(self.multi_polygon)
end