Where Can Pregnant Women Go? (WCPWG)
May 30, 2026 ยท View on GitHub
This all started after reading the NHS guidance on exercise in pregnancy.
Workflow
- Download the ZIP dataset:
- Run step0_downloadGlobe.py to download the GLOBE dataset.
- Convert the ZIP file to a BIN file (for use by FORTRAN natively):
- Create the boolean masks and vectorise inaccessible land:
- Change to the src directory, compile the FORTRAN program by running
gmake -rand then run./step2_createMask.
- Change to the src directory, compile the FORTRAN program by running
- Convert the sidecar BIN arrays to PNG images by running step3_convertBinToPng.py.
- Convert the sidecar PGM images to PNG images by running step4_convertPgmToPng.py.
- Convert the LinearRings in HDF files to Polygons in GeoJSON files:
- Check GeoJSON files by running step6_checkGeoJson.py.
- Make plots by running step7_makePlots.py.
Output
The FORTRAN program step2_createMask will print out:
> 93.802373% of the world is below 2,500 m ASL.
> 93.800614% of the world is accessible to pregnant women.
> 0.001759% of the world is inaccessible to pregnant women.
The Python script step7_makePlots.py will make:

Dependencies
WCPWG requires the following Python modules to be installed and available in your PYTHONPATH.
Additionally, due to the dependency on my FORTRAN library, you will also require the following Python modules to be installed and available in your PYTHONPATH:
WCPWG uses some Global Self-Consistent Hierarchical High-Resolution Geography resources and some Natural Earth resources via the cartopy module. If they do not exist on your system then cartopy will download them for you in the background. Consequently, a working internet connection may be required the first time you run WCPWG.
Bugs
- The algorithm does not cross the meridian. Therefore, if a valley is only accessible by crossing the meridian then this program will incorrectly mark it as inaccessible.