This commit is contained in:
苏尹岚
2021-03-11 10:02:32 +08:00
parent 7469a2d11f
commit 132d2780f2
2 changed files with 2 additions and 1 deletions

View File

@@ -556,7 +556,7 @@ func CalculateCoverArea(coordinate []string, vendorID int) (area float64) {
xys := jxutils.MillierConvertion(lat, lng)
xyList = append(xyList, xys)
}
var sum float64
var sum float64 = 0
for i := 0; i < len(xyList)-1; i++ {
// sum += (xyList[i+1][0] - xyList[i][0]) * (xyList[i+1][1] + xyList[i][1])
sum += (xyList[i][0]*xyList[i+1][1] - xyList[i+1][0]*xyList[i][1])