Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

This line: SELECT geom FROM myLayer.geom will return a hex value, i'm wondering how would it be possible to get decimal values, a result that look likes human-readable coordination?

Regards,

share|improve this question

3 Answers

up vote 3 down vote accepted

In addition to ST_AsText (which returns geometry as WKT / Well Known Text), there are several additional output formats, like ST_AsGeoJSON().

Take a look in http://postgis.org/documentation/manual-2.0/reference.html#Geometry_Outputs and choose, what fits your needs best.

share|improve this answer

use this:

SELECT ST_AsText(the_geom) 
       FROM myTable;

and viewing X,Y and geom object:

SELECT X(the_geom), Y(the_geom), ST_AsText(the_geom) 
       FROM myTable;

i hope it helps you...

share|improve this answer
SELECT * ST_AsText(the_geom) FROM table2;

Source: Beginner PostGIS question: getting geometry from multiple tables

share|improve this answer

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.