Hi,
I'm very much enjoying the new feature in GDAL that gives programmatic access
to the command-line tools. However, I've run into a problem using gdal.Warp
from within Python.
In the example IPython session below, you can see that I try to run gdal.Warp
and get an error, but using the equivalent parameters for the command-line (run
with the ! at the beginning from within IPython), it works fine.
In [15]: gdal.Warp('data.vrt', 'robin2.tif', srcSRS = 'EPSG:4326', dstSRS =
'EPSG:27700', geoloc=True)
---------------------------------------------------------------------------
SystemError Traceback (most recent call last)
<ipython-input-15-279de83a9634> in <module>()
----> 1 gdal.Warp('data.vrt', 'robin2.tif', srcSRS = 'EPSG:4326', dstSRS =
'EPSG:27700', geoloc=True)
/Users/robin/anaconda3/lib/python3.5/site-packages/osgeo/gdal.py in
Warp(destNameOrDestDS, srcDSOrSrcDSTab, **kwargs)
547
548 if _is_str_or_unicode(destNameOrDestDS):
--> 549 return wrapper_GDALWarpDestName(destNameOrDestDS, srcDSTab,
opts, callback, callback_data)
550 else:
551 return wrapper_GDALWarpDestDS(destNameOrDestDS, srcDSTab, opts,
callback, callback_data)
SystemError: <built-in function wrapper_GDALWarpDestName> returned NULL without
setting an error
In [16]: !gdalwarp data.vrt robin2.tif -geoloc -s_srs "EPSG:4326" -t_srs
"EPSG:27700"
Creating output file that is 1240P x 1162L.
Processing input file data.vrt.
0...10...20...30...40...50...60...70...80...90...100 - done.
Am I doing something wrong here in how I set the parameters for the gdal.Warp
call?
Thanks,
Robin
Dr Robin Wilson
Research Fellow
University of Southampton, UK
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev