Extracting coordinates from points

Any coordinate (that is, an X, Y, Z or M value) can be extracted from a geometry into a human-readable numeric format. The ST_X, SY_Y, and ST_Z functions are suited for that purpose. For example, to extract the X and Y coordinates of POIs into separate numeric columns, you can use the following:

SELECT id, name, ST_X(way) AS x_coord, ST_Y(way) as y_coord FROM planet_osm_point LIMIT 10;  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset