Module: OGR::GeometryTypes::Surface

Included in:
OGR::GeometryCollection, MultiPolygon, Polygon
Defined in:
lib/ogr/geometry_types/surface.rb

Instance Method Summary collapse

Instance Method Details

#areaFloat

Computes area for a LinearRing, Polygon, or MultiPolygon. The area of the feature is in square units of the spatial reference system in use.



10
11
12
# File 'lib/ogr/geometry_types/surface.rb', line 10

def area
  FFI::OGR::API.OGR_G_Area(@c_pointer)
end

#area_unitsHash

Returns the units used by the associated OGR::SpatialReference.



17
18
19
# File 'lib/ogr/geometry_types/surface.rb', line 17

def area_units
  spatial_reference&.linear_units
end