Class: GeographicItem::LineString

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

Overview

Line string definition…

Constant Summary collapse

SHAPE_COLUMN =
:line_string

Instance Method Summary collapse

Instance Method Details

#rendering_hashHash

Returns:

  • (Hash)


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

def rendering_hash
  line_string_to_hash(self.line_string)
end

#st_start_pointRGeo::Point

Returns first point in the line_string

Returns:

  • (RGeo::Point)

    first point in the line_string



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

def st_start_point
  geo_object.point_n(0)
end

#to_aArray

Returns arrays of points

Returns:

  • (Array)

    arrays of points



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

def to_a
  line_string_to_a(self.line_string)
end