Home > database >  Mysql spatial index calculation area is negative
Mysql spatial index calculation area is negative

Time:09-29

(1) the problem description: coordinates of a given city boundary sets, urban area was calculated by the ST_Area. Get area is negative, what should I do?
(2) calculation:
ST_Area (ST_GEOMFROMTEXT (' @ polygon))
(3) results:
4376610123.05078100
(4) the official data (ST_Area official) :
https://dev.mysql.com/doc/refman/5.7/en/gis-polygon-property-functions.html#function_st-area
(5) input data:
Wuwei city, gansu province boundary coordinates (word limit and can't stick attachment so can't show, because the coordinate large quantity)

CodePudding user response:

Mysql spatial coordinate point calculation area should be required deposit order, if you have the edge of the polygon coordinates cross, area calculation results may not be right, can draw a polygon on the map the first check,

CodePudding user response:

Emmmmmm, I had a test, the sort of overlapping really no problem, but I try to change the coordinate system, and even shameful not negative, the question is: why is transformed coordinates was no problem?
  • Related