Module: RGeo::ImplHelper::BasicMultiPointMethods

Included in:
Cartesian::MultiPointImpl, Geographic::ProjectedMultiPointImpl, Geographic::SphericalMultiPointImpl
Defined in:
lib/rgeo/impl_helper/basic_geometry_collection_methods.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#boundaryObject


208
209
210
# File 'lib/rgeo/impl_helper/basic_geometry_collection_methods.rb', line 208

def boundary
  factory.collection([])
end

#geometry_typeObject


203
204
205
# File 'lib/rgeo/impl_helper/basic_geometry_collection_methods.rb', line 203

def geometry_type
  Feature::MultiPoint
end

#initialize(factory_, elements_) ⇒ Object


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

def initialize(factory_, elements_)
  _set_factory(factory_)
  @elements = elements_.map do |elem_|
    elem_ = Feature.cast(elem_, factory_, Feature::Point, :keep_subtype)
    unless elem_
      raise Error::InvalidGeometry, "Could not cast #{elem_}"
    end
    elem_
  end
  _validate_geometry
end