[gdal-dev] using gdal on ironpython

Djordje Spasic issworld2000 at yahoo.com
Wed Nov 11 15:42: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 tried doing just that:
referencing both gdal 32 bit and 64 bit gdal .dll libraries, but without success:

    from clr import AddReferenceToFileAndPath as addref
    addref("c:/gdal/gdal_wrap.dll")

I am getting a message:

    > Runtime error (IOException): file does not exist: c:\gdal\gdal_wrap2.dll

Path: "c:/gdal/gdal_wrap.dll" is correct, so I do not understand why it says, that the file does not exist.

Can anyone help me on how upper two GDAL statements can be used in IronPython? Or in any other module? I basically need to project the .asc elevation data to Mercator. But it has to be in IronPython not in ArcGIS, QGIS or any other application.
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/20151111/ff8509cd/attachment.html>


More information about the gdal-dev mailing list