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.

Greetings,

I am a student who wishes to use GDAL to transform a series of images from Lambert Conformal Conic (EPSG: 9802) to Google Earth's WGS 84 (EPSG: 4326) for a web mapping project. I know that in order to perform this operation I need to use gdaltransform, which is an executable that can be used via command line.

My issue is not being able to wrap my head around how to use gdaltransform correctly. I have read several documents that source this link http://gdal.org/gdaltransform.html, but I have been unable to replicate the tutorial results. Can someone please help me understand what I am missing.

Source Code: This code is what I typed in replicate the demo found on the above link.

Input: gdaltransform -s_srs EPSG:9802 -t_srs EPSG:4326

Return: 0 0 0

Input: 177502 311865

Return: 177502 311865 0

Note: The return should read "244510.77404604 166154.532871342 -1046.79270555763" not "177502 311865 0"

Thank you for your help!

-James

share|improve this question
add comment

2 Answers

up vote 10 down vote accepted

Actually, you will want gdalwarp, not gdaltransform. There are lots of examples out there.

For example,

gdalwarp -t_srs 'EPSG:4326' input.tif output.tif

share|improve this answer
    
You might want to edit this to match your quotes. –  Sean Jan 11 '11 at 21:40
    
By any chance would you know how to call this in Python? –  James Jan 12 '11 at 0:32
    
import subprocess –  ThomasG77 Jan 12 '11 at 1:28
    
subprocess.call(["gdalwarp", "-t_srs", "EPSG:4326", "input.tif", "output.tif"]) –  ThomasG77 Jan 12 '11 at 1:31
    
You are awesome! Thank you for your help! However, I do have one last question. –  James Jan 12 '11 at 18:40
show 1 more comment

EPSG:9802 is an operation (map projection) method, not a complete coordinate reference system definition. There's not enough information for gdaltransform to work. Can you identify the data's current coordinate reference system? You can do a search by area at the online EPSG registry or download a Microsoft Access database version, EPSG Geodetic Parameter Dataset.

The example that you referenced is:

gdaltransform -s_srs EPSG:28992 -t_srs EPSG:31370

177502 311865

Produces the following output in meters in the "Belge 1972 / Belgian Lambert 72" projection:

244510.77404604 166154.532871342 -1046.79270555763

In this case, the input is EPSG:28992, "Amersfoort / RD New", not EPSG:9802.

share|improve this answer
    
That you mkennedy, I found your post to be rather informative and resourceful! –  James Jan 12 '11 at 21:40
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.