[GIS] ST_Transform not converting from utm to lat/lon

postgispostgresql

This line:

ST_AsText(ST_Transform(the_geom, 4326))

Returns the "coordinates" as utm coordinates. Although, I thought ST_Transform was supposed to convert the coordinates from utm to lat/lon. I found a tutorial where the behavior I need is shown in an example: http://postgis.net/workshops/postgis-intro/projection.html

Is there any reason why it would not be doing this?

Best Answer

Thanks for the help everyone. I guess the all the geometries in my database were set to the wrong SRIDs. The geometries had SRIDs of 4326 when they should have been 3400, and this is why ST_Transform wasn't doing anything.

This is the code that ended up giving me what I wanted:

ST_AsText(ST_Transform(ST_SetSRID(the_geom, 3400), 4326)))