Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm hava a problem I have a point layer (shapefile) insert to postgis! I'm using MapServer and OpenLayer to display layer on map! Now, i want get lon/lat all feature of layer! Hope somebody can help me! Thanks!

share|improve this question
add comment

1 Answer 1

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?)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.