Hello,
I am using the raster clip python script that I found at:
http://geospatialpython.com/2011/02/clip-raster-using-shapefile.htmlThis python script does exactly what I need to do, however teh resulting clipped raster does not seem to load in a correct spatial location.
To run it succesfully I needed to first change the following in the script:
lyr = shapef.GetLayer(shp) into
lyr = shapef.GetLayer()
as otherwise I was getting this error message:
'NoneType' object has no attribute 'GetNextFeature'
However the output clipped image is not loading in a correct spatial location (as indicated by the clip shapefile) but it loads at the upper left corner of the original input image to clip.
Please could anybody help? Much appreciated!
Thanks
Magda