views:

243

answers:

1

Is there a convention for whether GIS points in MySQL should be stored as POINT($latitude $longitude) or POINT($longitude $latitude)?

Having longitude correspond to X on a cartesian map would visually make more sense with north pointing up, but common parlance is to say "latitude and longitude."

+2  A: 

In MySQL you will probably use the GeomFromText() function to insert data in a spatial field. This function uses the WKT (Well-Known Text) format to define the geometries, and in the POINT case, it is defined as:

POINT ($longitude $latitude)
amercader
Do you have a source for this?
erjiang
Checkhttp://dev.mysql.com/doc/refman/5.0/en/gis-wkt-format.htmlandhttp://dev.mysql.com/tech-resources/articles/4.1/gis-with-mysql.html
amercader