function to calculate polygon areas in cdb