[gdal-dev] using gdal on ironpython

Djordje Spasic issworld2000 at yahoo.com
Thu Nov 12 13:25:37 PST 2015




Hello to gdal community,

I would like to replicate the following two statements GDAL python has:

    # project the decimal degrees to Mercator:
    gdalwarp -s_srs EPSG:4326 -t_srs EPSG:32631 -r cubic original.asc projected_to_Mercator.tif
    
    # convert the .tif file to .asc:
    gdal_translate -of AAIGrid projected_to_Mercator.tif projected_to_Mercator.asc​

But I can not install GDAL to IronPython 2.7, which is what I am using.
I googled a bit and Tamas Szekeres said that it is possible to "use the gdal C# bindings to access gdal". I succeeded in importing "gdal_csharp.dll" assembly into the IronPython:
from clr import AddReferenceToFileAndPath as addref
addref("c:/gdal/gdal2b/gdal_csharp.dll")

import OSGeo.GDAL as gdal


But how would I now project the upper .asc file to Mercator?It requires "gdal wrap" and "gdal translate" functionalities. Are they available through gdal_csharp.dll?

I would be very grateful for any help.

Thank you in advance,
Kind regards,
Djordje Spasic     

  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20151112/494d090e/attachment.html>


More information about the gdal-dev mailing list