Sha256: 46ff436438eae81bc06b0414067ab7e43d8bf450f746bbb2a704928548e16948

Contents?: true

Size: 488 Bytes

Versions: 2

Compression:

Stored size: 488 Bytes

Contents

module OGR
  module GeometryTypes
    module Surface

      # Computes area for a LinearRing, Polygon, or MultiPolygon.
      #
      # @return [Float] 0.0 for unsupported geometry types.
      def area
        FFI::GDAL.OGR_G_Area(@geometry_pointer)
      end

      # Returns a point that's guaranteed to lie on the surface.
      #
      # @return [OGR::Point]
      def point_on_surface
        build_geometry { |ptr| FFI::GDAL.OGR_G_PointOnSurface(ptr) }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ffi-gdal-1.0.0.beta3 lib/ogr/geometry_types/surface.rb
ffi-gdal-1.0.0.beta1 lib/ogr/geometry_types/surface.rb