Module: RGeo::ImplHelper::BasicLinearRingMethods

Included in:
Cartesian::LinearRingImpl, Geographic::ProjectedLinearRingImpl, Geographic::SphericalLinearRingImpl
Defined in:
lib/rgeo/impl_helper/basic_line_string_methods.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#ccw?Boolean

Returns:

  • (Boolean)


163
164
165
# File 'lib/rgeo/impl_helper/basic_line_string_methods.rb', line 163

def ccw?
  RGeo::Cartesian::Analysis.ccw?(self)
end

#geometry_typeObject



159
160
161
# File 'lib/rgeo/impl_helper/basic_line_string_methods.rb', line 159

def geometry_type
  Feature::LinearRing
end

#initialize(factory, points) ⇒ Object



154
155
156
157
# File 'lib/rgeo/impl_helper/basic_line_string_methods.rb', line 154

def initialize(factory, points)
  super
  raise Error::InvalidGeometry, "LinearRings must have 0 or >= 4 points" if @points.size.between?(1, 3)
end