Cell:area() function is returning always the same value.
For cellular space, it works fine, but for common spatial data, it is not working.
TerraLib getArea() function is wrong as well.
getArea = function(geom)
local geomType = geom:getGeometryType()
if (geomType == "MultiPolygon") or (geomType == "CurvePolygon") or
(geomType == "Polygon") then
local env = geom:getMBR()
return env:getArea() -->>> correct is geom:getArea(), not env:getArea()
else
customWarning("Geometry should be a polygon to get the area.")
end
return 0
end,
Cell:area() function is returning always the same value. For cellular space, it works fine, but for common spatial data, it is not working.
TerraLib getArea() function is wrong as well.