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 need to convert line strings back to latitude & longitude coordinates.

Here are is an example, please keep in mind that they do NOT reference the same point. I have included the values to illustrate the differences between the way points are stored in PostGIS and what I need, which is the values in degrees.

Example: The data used to expresses a point in QGIS looks something like... 663821.19 1185061.15

I want to convert it to degrees so it looks some thing like this... 10.679080000 -61.507780000

Any thoughts on this would be greatly appreciated.

share|improve this question
1  
To project correctly, you need to know the coordinate system of the original data. What was the projection of the original data? Do you want a SQL query to project and create a new layer in PostGIS itself? or do you need something else? –  Devdatta Tengshe Jun 12 '13 at 6:32
    
The function you should look for is ST_Tranform in PostGIS –  Devdatta Tengshe Jun 12 '13 at 6:37
    
The coordinate system of the original data is WGS 84 UTM 20 North. What I need is to convert the Line strings (Roads & Streets) to line strings of longitude latitude, longitude latitude, longitude latitude, etc... So I can import them into Gisgraphy –  JH Ward Jun 13 '13 at 19:52

1 Answer 1

To do this simply, all you need to do is change the projection.

You can probably do this straight in PostGIS by doing a select and specifying the coordinate system, but I'll outline how to do it in QGIS.

  1. Load the layer in QGIS and ensure that the projection is defined, if it is not defined, define it (if you don't know what projection it is look for metadata or talk to someone who you got the data from)

  2. Save the layer out of QGIS by right clicking on the layer and choosing 'save as' then specifying your target projection (looks like lat, lon, so perhaps WGS84 would do you).

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.