Sha256: c47674c87c49939eb8155add8910dbb0178dd02588a9c185b4ab7cdfc7f3250f
Contents?: true
Size: 818 Bytes
Versions: 2
Compression:
Stored size: 818 Bytes
Contents
require_relative '../../ffi/ogr/api' module OGR module GeometryTypes module Surface # Computes area for a LinearRing, Polygon, or MultiPolygon. The area of # the feature is in square units of the spatial reference system in use. # # @return [Float] 0.0 for unsupported geometry types. def area FFI::OGR::API.OGR_G_Area(@c_pointer) end # Returns the units used by the associated OGR::SpatialReference. # # @return [Hash] def area_units spatial_reference ? spatial_reference.linear_units : nil end # Returns a point that's guaranteed to lie on the surface. # # @return [OGR::Point] def point_on_surface build_geometry { |ptr| FFI::OGR::API.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.beta5 | lib/ogr/geometry_types/surface.rb |
ffi-gdal-1.0.0.beta4 | lib/ogr/geometry_types/surface.rb |