0
votes

When looking at MySQL's Polygon Functions page, one can see comprehensive examples for using the polygon/spatial functions but it does not say something about the format of the polygon points.

An example of a polygon string is

Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))

but it is not clear whether it is using LatLng or LngLat.

What is the correct MySQL Polygon format for Latitude and Longitude?

2
Probably they are Euclidean. Guess you need Polar genometryEd Heal

2 Answers

1
votes

The axis order for coordinates in WKT is Cartesian, so (X Y) or (longitude latitude).

0
votes

There is no correct format to LatLng if you are using Poylgon type on mysql because latLng is a POINT and not a Polygon.

So you must use a POINT type.

eg.

 POINT(-22.984439228720408 -43.2029068475822);