Scaling Geometry to Match Image File


katsonandrew3.5@...
 

Hi,

I know this is not a fiona specific question but I figure since this kind of covers a variety of modules written by the same people (or at least understood) that I might get an answer here.

I am attempting to do a mask over a population image file using geometries but they are in different projections and different scales. Here are my modules below.

I am using this set of land boundaries: https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_boundary_lines_land.zip
and this population image file: https://ghsl.jrc.ec.europa.eu/download.php?ds=pop (with the 250 m resolution)

Here is how I read in the population file:

world_pop_image =

Here is how I do my reprojection:


Below are all my python packages

Python 3.6
with
Click 7
Fiona 1.8.11
Geometry 0.0.23
Pillow 6.2.1
PyContracts 1.8.12
PyGeometry 1.5.6
Rtree 0.8.3
Shapely 1.6.4.post2
affine 2.3.0
atomicwrites 1.3.0
attrs 19.3.0
certifi 2019.9.11
chardet 3.0.4
click-plugins 1.1.1
cligj 0.5.0
coverage 4.5.4
cupy 6.5.0
cycler 0.10.0
decorator 4.4.1
descartes 1.1.0
fastrlock 0.4
future 0.18.2
geopandas 0.6.1
h5py 2.10.0
idna 2.8
imageio 2.6.1
importlib-metadata 0.23
kiwisolver 1.1.0
matplotlib 3.1.1
more-itertools 7.2.0
munch 2.5.0
numpy 1.17.4
packaging 19.2
pandas 0.25.0
pip 19.3.1
pluggy 0.13.0
psutil 5.6.5
py 1.8.0
pyparsing 2.4.5
pyproj 2.4.1
pytest 5.2.1
pytest-cov 2.8.1
python-Levenshtein 0.12.0
python-dateutil 2.8.1
pytz 2019.3
rasterio 1.0.25
requests 2.22.0
scipy 1.3.1
setuptools 41.6.0
six 1.13.0
snuggs 1.4.7
urllib3 1.25.7
wcwidth 0.1.7
zipp 0.6.0

Join main@fiona.groups.io to automatically receive all group messages.