title: Get latitude/longitude from PostGIS point
body: <p>I have a PostGIS table with a geometry field of SRID 3857 data. I want to get the centroid of the geometry as lat/lon coordinates, but can't seem to convert the values correctly:</p>
  
  <pre><code>SELECT 
  ST_X(ST_CENTROID(geometry)),
  ST_Y(ST_CENTROID(geometry)),
  ST_X(ST_TRANSFORM(ST_CENTROID(geometry),3857)) AS LONG, 
  ST_Y(ST_CENTROID(ST_TRANSFORM(geometry,3857))) AS LAT
  FROM my_table
  </code></pre>
  
  <p>=> -8220067.19453888107, 4997528.08142071683, -8220067.19453888107, 4997528.08142071683</p>