[gdal-dev] GDAL Python Projection Question

Discourse Maps discoursemap at live.com
Mon Apr 12 11:46:53 EDT 2010


I am attempting to use GDAL with Python to reproject a raster (called 'deforest') from Geographic Coordinate System to NAD83_UTM10N.

Most of the projection tutorials seem to be in C...
Can anyone offer assistance for Python?

 My current code:

     ds = gdal.Open('lulc_samp_cur', GA_ReadOnly)
     if ds is None:
          gp.AddError("Could not open image")
     band = ds.GetRasterBand(1)

    # obtain projection info from current LULC raster 'lulc_samp_cur'
     prj_lcraster = ds.GetProjection()
     ds = None
    # Project Raster for image 'defores' to same projection as 'lulc_samp_cur'
     ds = gdal.Open('deforest', GA_ReadOnly)

Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100412/d522d080/attachment.html

More information about the gdal-dev mailing list