Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ Tiles/
**/*.bak
**/*.swp
.last_gui_params.txt
z_Python_Venv
5 changes: 5 additions & 0 deletions Providers/Global/EOX2-2021.lay
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
request_type=tms
grid_type=webmercator
url_template=https://{switch:a,b,c,d}.s2maps-tiles.eu/wmts/?layer=s2cloudless-2021_3857&style=default&tilematrixset=GoogleMapsCompatible&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fjpeg&TileMatrix={zoom}&TileCol={x}&TileRow={y}
max_zl=14
imagery_dir=grouped
11 changes: 11 additions & 0 deletions requirements_nover.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
certifi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on the thoughts of the developer/maintainer, I think it's best to version lock this and to replace the existing requirements file as otherwise both files will have to be maintained. This file will eventually fall out of sync as soon as a package makes a breaking change.

Copy link
Author

@JT8D-17 JT8D-17 May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm against version locking by default. If a package makes a breaking change, the particular requirement can still be version locked. Besides, I don't see no harm in two requirements files.

But I'm not trying to get the entire PR merged anyway. It's just here for Oscar's consideration and cherry picking changes.

chardet
idna
numpy
Pillow
pyproj
requests
Rtree
Shapely
urllib3
build
39 changes: 39 additions & 0 deletions z_Install_Python_Venv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#! /bin/bash

path="$PWD/z_Python_Venv"

# 1. Create a Python virtual environment

python -m venv $path

# 2. Activate Python venv

source $path/bin/activate

# 3. Install packages with pip

pip install -r $PWD/requirements_nover.txt

# 4. Download scikit-fmm's "meson" branch, compile and install it

git clone --branch meson https://github.com/scikit-fmm/scikit-fmm.git $path/scikit-fmm

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't necessary as there is a package on pypi that seems to do the trick.

I've just been looking at making the local process a bit more self contained but stumbled across your PR as I was about to submit one.

Via Python 3.11, here's the list of requirements that I was going to submit in a PR. Note that Rtree has been updated as the version referenced by Ortho4XP doesn't include a required DLL. sckit-fmm is also referenced.

certifi==2024.2.2
chardet==5.2.0
charset-normalizer==3.3.2
idna==3.7
numpy==1.26.4
pillow==10.3.0
pyproj==3.6.1
requests==2.31.0
Rtree==1.2.0
scikit-fmm==2023.4.2
shapely==2.0.4
urllib3==2.2.1

Copy link
Author

@JT8D-17 JT8D-17 May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step is absoluttely necessary on Python 3.12 on Arch and one of the very reasons why I wrote the script in the first place.


python -m build $path/scikit-fmm

pip install $path/scikit-fmm

# 6. DONE

echo " "
echo "Preparation complete!"
echo " "
echo "Use \"$path/bin/python $PWD/Ortho4XP\" to start O4XP"
echo " "
echo " "

# Function: Pause
function pause(){
read -p "$*"
}

pause "Press enter to continue... "
5 changes: 5 additions & 0 deletions z_Start_O4XP_PythonVenv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /bin/bash

path="$PWD/z_Python_Venv"

$path/bin/python $PWD/Ortho4XP.py