lib/turf/area.rb
def area_calculate_area(geom)
    case geom[:type]
    when "Polygon"
      area_polygon_area(geom[:coordinates])
    when "MultiPolygon"
      geom[:coordinates].map do |coordinate|
        area_polygon_area(coordinate)
      end.sum
    else
      0
    end
  end
# Takes one or more features and returns their area in square meters.
# @see https://turfjs.org/docs/#area
# @param geojson [GeoJSON] input GeoJSON feature(s)
# @return [number] aria in square meters
Takes one or more features and returns their area in square meters.
Takes one or more features and returns their area in square meters .
def area_calculate_area(geom)
    case geom[:type]
    when "Polygon"
      area_polygon_area(geom[:coordinates])
    when "MultiPolygon"
      geom[:coordinates].map do |coordinate|
        area_polygon_area(coordinate)
      end.sum
    else
      0
    end
  end
def area_calculate_area ( geom ) case geom [ :type ] when "Polygon" area_polygon_area ( geom [ :coordinates ] ) when "MultiPolygon" geom [ :coordinates ] . map do | coordinate | area_polygon_area ( coordinate ) end . sum else 0 end end
Takes one or more features and returns their area in square meters.
Takes one or more features and returns their area in square meters .
aria in square meters
aria in square meters
number
geom
geojson
input GeoJSON feature(s)
input GeoJSON feature ( s )
see
None