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

#_validate_geometryObject

:nodoc:


190
191
192
193
194
195
196
197
198
# File 'lib/rgeo/impl_helper/basic_line_string_methods.rb', line 190

def _validate_geometry  # :nodoc:
  super
  if @points.size > 0
    @points << @points.first if @points.first != @points.last
    if !@factory.property(:uses_lenient_assertions) && !is_ring?
      raise Error::InvalidGeometry, 'LinearRing failed ring test'
    end
  end
end

#geometry_typeObject


201
202
203
# File 'lib/rgeo/impl_helper/basic_line_string_methods.rb', line 201

def geometry_type
  Feature::LinearRing
end