raster clip

55 vistas
Ir al primer mensaje no leído

magda

no leída,
19 feb 2014, 6:21:20 a.m.19/2/14
para geospati...@googlegroups.com
Hello,

I am using the raster clip python script that I found at:
http://geospatialpython.com/2011/02/clip-raster-using-shapefile.html

This 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

Joel Lawhead

no leída,
19 feb 2014, 7:20:53 a.m.19/2/14
para geospati...@googlegroups.com
Magda,

It sounds like the "y" value is flipped or is not being calculated correctly for the world file or referencing information. 
--
You received this message because you are subscribed to the Google Groups "Geospatial Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geospatialpyth...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


--
Joel Lawhead, PMP
E-mail: jlaw...@geospatialpython.com
Web: GeospatialPython.com
Twitter: @SpatialPython

Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos