Sha256: 1f45f90ee5ad3c78fdc62e9f839bb62f40dc5f5993fbe24dabaece9bf6c1db33

Contents?: true

Size: 686 Bytes

Versions: 3

Compression:

Stored size: 686 Bytes

Contents

# frozen_string_literal: true

require_relative "../geometry_types/container"
require_relative "../geometry_types/surface"

module OGR
  class MultiPolygon
    include OGR::Geometry
    include GeometryTypes::Container
    include GeometryTypes::Surface

    # @param [FFI::Pointer] geometry_ptr
    def initialize(geometry_ptr = nil, spatial_reference: nil)
      geometry_ptr ||= OGR::Geometry.create(:wkbMultiPolygon)
      initialize_from_pointer(geometry_ptr)
      self.spatial_reference = spatial_reference if spatial_reference
    end

    # @return [OGR::Geometry]
    def union_cascaded
      build_geometry { FFI::OGR::API.OGR_G_UnionCascaded(@c_pointer) }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ffi-gdal-1.1.0 lib/ogr/geometries/multi_polygon.rb
ffi-gdal-1.0.4 lib/ogr/geometries/multi_polygon.rb
ffi-gdal-1.0.3 lib/ogr/geometries/multi_polygon.rb