I have a point layer (shapefile) insert to PostGIS. I'm using MapServer and OpenLayers to display layer on map. Now, I want get lon/lat of all features of the layer.
Hope somebody can help me.
I have a point layer (shapefile) insert to PostGIS. I'm using MapServer and OpenLayers to display layer on map. Now, I want get lon/lat of all features of the layer.
Hope somebody can help me.
To extract lon/lat in text format from a database table, you can do something like:
SELECT ST_X(geom), ST_Y(geom) FROM yourgeospatialtable;
Where geom
is the spatially enabled column.
There probably is also an OpenLayers function to do that, but I am not exactly sure where you want to do it (server/client?)