[SciPy-User] match extent of arrays

questions anon questions.anon@gmail....
Wed Nov 16 18:46:22 CST 2011

Hello All,
I have an array that I created from a shapefile using gdal.RasterizeLayer
and then ReadAsArray().
I would like the array I created from a shapefile to match my array from a
netcdf file.
I am not sure how I go about this.

The extents of the shapefile/raster/array are:

x_min, x_max, y_min, y_max 140.962408758 149.974994992 -39.1366533667

The extents and size for my array from netcdf files are:

139.8 max longitude: 150.0 min latitude -39.2 max latitude: -33.6
LAT size 106 LON size 193

Any ideas on how I might achieve this?
The overal goal is to then use the array from a shapefile as a mask for my
netcdf files.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20111117/137d8d25/attachment.html 

More information about the SciPy-User mailing list