Geospatial image resampling in Python