Skip to content

Commit 2dd81b6

Browse files
committed
set gdal>=3.6.2 and shapely>=2.0.2 in dependencies.txt
1 parent 1037806 commit 2dd81b6

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

.github/workflows/linting_and_testing.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,9 @@ jobs:
3737
conda-remove-defaults: "true"
3838

3939

40-
- name: Install dependencies for windows python 3.10
41-
if: ${{ matrix.os == 'windows-latest' && matrix.python-version == '3.10' }}
42-
run: |
43-
conda run -n test conda info
44-
conda run -n test conda install -c loop3d -c conda-forge "gdal=3.4.3" python=${{ matrix.python-version }} -y
45-
conda run -n test conda install -c loop3d -c conda-forge --file dependencies.txt python=${{ matrix.python-version }} -y
46-
conda run -n test conda install pytest python=${{ matrix.python-version }} -y
47-
48-
- name: Install dependencies for other environments
49-
if: ${{ matrix.os != 'windows-latest' || matrix.python-version != '3.10' }}
40+
- name: Install dependencies
5041
run: |
5142
conda run -n test conda info
52-
conda run -n test conda install -c loop3d -c conda-forge gdal python=${{ matrix.python-version }} -y
5343
conda run -n test conda install -c loop3d -c conda-forge --file dependencies.txt python=${{ matrix.python-version }} -y
5444
conda run -n test conda install pytest python=${{ matrix.python-version }} -y
5545

dependencies.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
gdal>=3.6.2
12
numpy
23
scipy
34
geopandas
4-
shapely>=2
5+
shapely>=2.0.2
56
networkx
67
owslib
78
loopprojectfile==0.2.2

map2loop/thickness_calculator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,7 @@ def compute(
365365
# calculate the length of the shortest line
366366
line_length = scipy.spatial.distance.euclidean(p1, p2)
367367
# find the indices of the points that are within 5% of the length of the shortest line
368-
# indices = shapely.dwithin(short_line, interp_points, line_length * 0.25)
369-
indices= numpy.array([shapely.distance(short_line[0],point)<= (line_length * 0.25) for point in interp_points])
368+
indices = shapely.dwithin(short_line, interp_points, line_length * 0.25)
370369
# get the dip of the points that are within
371370
_dip = numpy.deg2rad(dip[indices])
372371
_dips.append(_dip)

0 commit comments

Comments
 (0)