Skip to content

Commit 3346cd6

Browse files
committed
remove the dependency on gdal, and change all gdal function to rasterio-based
1 parent 50be7e1 commit 3346cd6

File tree

9 files changed

+518
-268
lines changed

9 files changed

+518
-268
lines changed

requirements/gdal-strict.txt

-7
This file was deleted.

requirements/gdal.txt

-5
This file was deleted.

run_developer_setup.sh

-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ python -m pip install -r requirements/build.txt
145145
python -m pip install -r requirements/runtime.txt
146146
python -m pip install -r requirements/optional.txt
147147
python -m pip install -r requirements/tests.txt
148-
python -m pip install -r requirements/gdal.txt
149148

150149

151150
# Hack for setuptools while scikit-build sorts things out

src/python/pycold/colds.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from ._param_validation import (
1212
validate_parameter_constraints,
1313
Interval,
14-
Integral,
1514
Real,
1615
check_consistent_length,
1716
check_1d,
@@ -396,15 +395,14 @@ def sccd_detect(
396395
ts_t: 1d array of shape(observation numbers), time series of thermal band
397396
qas: 1d array, the QA cfmask bands. '0' - clear; '1' - water; '2' - shadow; '3' - snow; '4' - cloud
398397
p_cg: probability threshold of change magnitude, 0.99
399-
pos: position id of the pixel, i.e., (row -1) * ncols + col, row and col starts from 1
400398
conse: consecutive observation number
399+
pos: position id of the pixel, i.e., (row -1) * ncols + col, row and col starts from 1
401400
b_c2: bool, a temporal parameter to indicate if collection 2. C2 needs ignoring thermal band for valid pixel
402401
test due to its current low quality
403402
b_pinpoint: bool, output pinpoint break where pinpoint is an overdetection of break using conse =3
404403
and threshold = gate_tcg, which are used to simulate the situation of NRT scenario and
405404
for training a machine-learning model
406405
gate_pcg: the gate change probability threshold for defining anomaly
407-
b_output_state: indicate whether to output state variables
408406
state_intervaldays: the day interval for output states (only b_output_state is True)
409407
b_fitting_coefs: True indicates using curve fitting to get global harmonic coefficients, otherwise use the local coefficients
410408
Returns
@@ -654,8 +652,6 @@ def cold_detect_flex(
654652
should have the same date, only for b_output_cm is True. Only b_output_cm == 'True'
655653
n_cm: the length of outputted change magnitude. Only b_output_cm == 'True'
656654
cm_output_interval: the temporal interval of outputting change magnitudes. Only b_output_cm == 'True'
657-
b_c2: bool, a temporal parameter to indicate if collection 2. C2 needs ignoring thermal band for valid pixel
658-
test due to the current low quality
659655
gap_days: define the day number of the gap year for determining i_dense. Setting a large value (e.g., 1500)
660656
if the gap year in the middle of the time range
661657
tmask_b1: the first band id for tmask
@@ -742,16 +738,15 @@ def sccd_detect_flex(
742738
dates: 1d array of shape(observation numbers), list of ordinal dates
743739
ts_stack: 2d array of shape (observation numbers), horizontally stacked multispectral time series.
744740
qas: 1d array, the QA cfmask bands. '0' - clear; '1' - water; '2' - shadow; '3' - snow; '4' - cloud
745-
t_cg: threshold of change magnitude, default is chi2.ppf(0.99,5)
746-
pos: position id of the pixel, i.e., (row -1) * ncols + col, row and col starts from 1
741+
p_cg: probaility threshold of change magnitude, default is 0.99
747742
conse: consecutive observation number
743+
pos: position id of the pixel, i.e., (row -1) * ncols + col, row and col starts from 1
748744
b_c2: bool, a temporal parameter to indicate if collection 2. C2 needs ignoring thermal band for valid pixel
749745
test due to its current low quality
750746
b_pinpoint: bool, output pinpoint break where pinpoint is an overdetection of break using conse =3
751747
and threshold = gate_tcg, which are used to simulate the situation of NRT scenario and
752748
for training a machine-learning model
753749
gate_pcg: the gate change probability threshold for defining anomaly
754-
b_output_state: indicate whether to output state variables
755750
state_intervaldays: the day interval for output states (only b_output_state is True)
756751
tmask_b1: the first band id for tmask
757752
tmask_b2: the second band id for tmask

0 commit comments

Comments
 (0)