Longitude measures a location east or west of the prime meridian. In geospatial SQL, longitude appears in degree-based coordinates, with longitude listed before latitude. section 10.5.1
Use longitude when transforming and publishing point coordinates:
- Transform projected coordinates to SRID 4326, which represents locations using longitude and latitude. section 10.5.1
- Extract longitude from a transformed point with ST_X, then pass it to a map URL as the mlon parameter. section 10.5.1
Mapping Tampa's longitude
Transform Tampa's point to degree coordinates, then generate an OpenStreetMap URL. The result is POINT(-82.458444 27.947759499952074), where -82.458444 is longitude; the URL passes it through mlon. section 10.5.1
Listing 10.12 Transforming coordinates to latitude and longitude
SELECT name, ST_AsText(ST_Transform(way, 4326)) AS coordinates FROM florida.planet_osm_point WHERE name = 'Tampa' and place = 'city';
Inspect the SQL that transforms a stored point into longitude-and-latitude coordinates. section 10.5.1

