Using the post-processing
There are two post-processing tools: agricultural and shipping. The post-processing of agriculture needs a reference scenario. The program expects a folder "Basis_REF" in the input folder with the scenarios.
Installing the post-processing tool
Post-processing includes Python scripts calculating effect on shipping and agriculture and creating a dashboard from the results.
They require Python, and the following side packages:
- matplotlib
- openpyxl
- scipy
The script calculating effects on agriculture contain Geopandas. The installation of Geopanas is the following (this guide is valid for an older version, the versions can be replaced, e.g. Python39):
################
Installing geopandas using pip
This is assuming Python is installed in : c:\Python\Python36
################
In this guide we explain the steps to install geopandas. It is very important that these steps are followed in the right order.
Otherwise the installation might become corrupted.
Note that everytime a file needs to be run in command window, this needs to be done as ADMINISTRATOR.
Step 1: Uninstall any dependencies (which might have accidently been installed) by running geopandas-uninstall.bat in cmd as administrator.
Step 2: Install Microsoft Visual Studio Build Tools 2019 by running the file vs_buildtools__2074514829.1566813139.exe
- During installation when it asks which components to install, select C++ build tools
- ensure the latest versions of MSVCv142 - VS 2019 C++ x64/x86 build tools and Windows 10 SDK are checked
- Click on install
Step 3: Modify System Environment Variables
- the system environment variables are found by searching for envi in your Windows Search button
- Add a System Environment Variable with name: INCLUDE pointing at C:\Program Files (x86)\Windows Kits\10\Include\<version>\ucrt
Step 4: Run geopandas-installation1.bat as administrator in CMD.
- This will install GDAL
Step 5: Modify System Environment Variables
- the system environment variables are found by searching for envi in your Windows Search button
- Edit the System Environment Variable with name: PATH and add an extra line pointing at c:\Python37\Lib\site-packages\osgeo
- Note that you do not delete the other lines at your PATH environment variable, only add a new one.
Step 6: Run geopandas-installation2.bat as administrator in CMD.
- This will install all other dependencies on GDAL
step 7: copy FileGDBAPI.dll to c:\Python\Python36\Lib\site-packages\osgeo\gdalplugins\
Step 8: Modify System Environment Variables
- Add a System Environment Variable with name: GDAL_DRIVER_PATH pointing at c:\Python\Python36\Lib\site-packages\osgeo\gdalplugins
- Edit the System Environment Variable with name: PATH pointing at c:\Python\Python36\Lib\site-packages\osgeo\gdalplugins
Step 9:
- check if installation was succesful by running gdalinfo
Note:
More information and installation guidelines found at:
https://geoffboeing.com/2014/09/using-geopandas-windows/ (GDAL and dependencies)
https://wiki.python.org/moin/WindowsCompilers (visual studio)
https://gis.stackexchange.com/questions/198289/does-gohlke-gdal-break-command-line-gdal-ogr-in-windoiws (environment variables)
geopandas-installation1.bat
set PATH=
set PY_HOME=c:\Python37
set PYTHONPATH=%PY_HOME%\Lib;%PY_HOME%\DLLs;%PY_HOME%\Lib\lib-tk
set PATH=%PATH%;%PY_HOME%;%PY_HOME%\Scripts
call pip install GDAL-3.0.1-cp37-cp37m-win_amd64.whl
pause
geopandas-installation2.bat
set PATH=
set PY_HOME=c:\Python\Python36
set PYTHONPATH=%PY_HOME%\Lib;%PY_HOME%\DLLs;%PY_HOME%\Lib\lib-tk
set PATH=%PATH%;%PY_HOME%;%PY_HOME%\Scripts
call pip install Fiona-1.8.9-cp36-cp36m-win_amd64.whl
call pip install pyproj-2.4.0-cp36-cp36m-win_amd64.whl
call pip install Rtree-0.8.3-cp36-cp36m-win_amd64.whl
call pip install Shapely-1.6.4.post2-cp36-cp36m-win_amd64.whl
call pip install geopandas
pause