Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfrantz committed Feb 20, 2025
2 parents 124cd32 + 53c778b commit 29f289f
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 11 deletions.
8 changes: 8 additions & 0 deletions bash/force-cube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,14 @@ for i in "$@"; do
fi
fi

# is there at least one feature?
if [ "$RASTER" == "false" ]; then
N_FEATURES=$($VECTOR_INFO_EXE -ro $FINP $LAYER | grep "Feature Count" | tr -d ' ' | cut -d ':' -f2)
if ! is_integer "$N_FEATURES" || is_lt "$N_FEATURES" 1; then
echoerr "no features found in input layer."; exit 1
fi
fi

# bounding box
if [ "$RASTER" == "true" ]; then
FTMP="$FTMP.vrt"
Expand Down
5 changes: 5 additions & 0 deletions bash/force-tile-extent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ cd "$DIR_TMP" || {
exit 1
}

if [ $? -ne 0 ]; then
echoerr "force-cube returned an error."
echoerr "run '$BINDIR"/"force-cube -j 0 -s 10 -o $TMP -b force-extent $INP' to see where the error occurred."
exit 1
fi

# find all the generated masks
FILES_MASK=$(ls -d X*/*.tif)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/history/v3/v-03-08-00.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FORCE v. 3.8.00
Release: 31.01.2025


- **FORCE L1AS*
- **FORCE L1AS**

- force-level1-sentinel2 was finally removed after being deprecated for a while now.
Use force-level1-csd. Contributions to substitute this program using the
Expand Down
21 changes: 21 additions & 0 deletions docs/source/history/v3/v-03-08-01.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. _v3800:

FORCE v. 3.8.01
===============

Release: 20.02.2025


- **FORCE HLPS**

- Fixed a bug when attempting to use Sentinel-2C/D due to some
typos in the sensor enum definition.
Thanks to Kasia Lewinska for pointing me in this direction.

- **FORCE AUX**

- Florian Katerndahl added a safety check to ``force-cube``, as well as
``force-tile-extent`` to throw a warning when no features are present
in a vector layer. Thanks!


6 changes: 6 additions & 0 deletions misc/force-bash-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,9 @@ is_eq(){
if [ "$res" == "true" ]; then return 0; else return 1; fi
}
export -f is_eq

# number is an integer?
is_integer(){
if [[ "$1" =~ ^-?[0-9]+$ ]]; then return 0; else return 1; fi
}
export -f is_integer
2 changes: 1 addition & 1 deletion misc/force-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8.00-dev:::2025-01-31_08:37:56
3.8.01
10 changes: 5 additions & 5 deletions src/modules/cross-level/enum-cl.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ const tagged_enum_t _TAGGED_ENUM_SEN_[_SEN_LENGTH_] = {
{ _SEN_LND04_, "LND04" }, { _SEN_LND05_, "LND05" },
{ _SEN_LND07_, "LND07" }, { _SEN_LND08_, "LND08" },
{ _SEN_LND09_, "LND09" }, { _SEN_SEN2A_, "SEN2A" },
{ _SEN_SEN2B_, "SEN2B" }, { _SEN_sen2a_, "sen2a" },
{ _SEN_sen2b_, "sen2b" }, { _SEN_LNDLG_, "LNDLG" },
{ _SEN_SEN2B_, "SEN2B" }, { _SEN_SEN2C_, "SEN2C" },
{ _SEN_SEN2D_, "SEN2D" }, { _SEN_sen2a_, "sen2a" },
{ _SEN_sen2b_, "sen2b" }, { _SEN_sen2c_, "sen2c" },
{ _SEN_sen2d_, "sen2d" }, { _SEN_LNDLG_, "LNDLG" },
{ _SEN_SEN2L_, "SEN2L" }, { _SEN_SEN2H_, "SEN2H" },
{ _SEN_RGB_, "R-G-B" }, { _SEN_S1AIA_, "S1AIA" },
{ _SEN_S1AID_, "S1AID" }, { _SEN_S1BIA_, "S1BIA" },
{ _SEN_S1BID_, "S1BID" }, { _SEN_VVVHP_, "VVVHP" },
{ _SEN_MOD01_, "MOD01" }, { _SEN_MOD02_, "MOD02" },
{ _SEN_MOD02_, "MODIS" }, { _SEN_SEN2B_, "SEN2C" },
{ _SEN_sen2c_, "sen2c" }, { _SEN_SEN2B_, "SEN2D" },
{ _SEN_sen2a_, "sen2d" }};
{ _SEN_MOD02_, "MODIS" }};

const tagged_enum_t _TAGGED_ENUM_QAI_[_QAI_LENGTH_] = {
{ _QAI_OFF_, "NODATA" }, { _QAI_CLD_OPQ_, "CLOUD_OPAQUE" },
Expand Down
8 changes: 4 additions & 4 deletions src/modules/cross-level/enum-cl.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ enum { OPEN_FALSE, // do not write

// sensors
enum { _SEN_LND04_, _SEN_LND05_, _SEN_LND07_, _SEN_LND08_, _SEN_LND09_,
_SEN_SEN2A_, _SEN_SEN2B_, _SEN_sen2a_, _SEN_sen2b_, _SEN_LNDLG_,
_SEN_SEN2L_, _SEN_SEN2H_, _SEN_RGB_, _SEN_S1AIA_, _SEN_S1AID_,
_SEN_S1BIA_, _SEN_S1BID_, _SEN_VVVHP_, _SEN_MOD01_, _SEN_MOD02_,
_SEN_MODIS_, _SEN_SEN2C_, _SEN_sen2c_, _SEN_SEN2D_, _SEN_sen2d_,
_SEN_SEN2A_, _SEN_SEN2B_, _SEN_SEN2C_, _SEN_SEN2D_, _SEN_sen2a_,
_SEN_sen2b_, _SEN_sen2c_, _SEN_sen2d_, _SEN_LNDLG_, _SEN_SEN2L_,
_SEN_SEN2H_, _SEN_RGB_, _SEN_S1AIA_, _SEN_S1AID_, _SEN_S1BIA_,
_SEN_S1BID_, _SEN_VVVHP_, _SEN_MOD01_, _SEN_MOD02_, _SEN_MODIS_,
_SEN_LENGTH_ };

// wavelength domains
Expand Down

0 comments on commit 29f289f

Please sign in to comment.