Skip to content

Instantly share code, notes, and snippets.

@CEZERT
Last active May 15, 2024 09:27
Show Gist options
  • Save CEZERT/f80240fb3a301938758f38ba2f788c5a to your computer and use it in GitHub Desktop.
Save CEZERT/f80240fb3a301938758f38ba2f788c5a to your computer and use it in GitHub Desktop.

STATIQUE

'- ' || to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:="longueur", filter:=( "ft"  like '%_DET_DETECT%')),2)) || ' m ----- Detection OK ---'  ||  '\n' || 
'- ' || to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:= "longueur",filter:=("ft" LIKE '%_DETECTION_PERT%')),2)) || ' m ----- Perturbée ---' ||  '\n'  || 
'- ' || to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:= "longueur",filter:="ft" LIKE '%INACCESSIBLE%'),2)) || ' m ----- Inaccessible ---' ||  '\n'  || 
'- ' || to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:= "longueur",filter:="ft" LIKE '%CULTURE%'),2)) || ' m ----- Zone culture ---' ||  '\n'  || 
'- ' || to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:= "longueur",filter:="ft" LIKE '%TRADI%'),2)) || ' m ----- Tradi à faire ---' ||  '\n'  || 
'\n'  ||  'Total --- ' || 
to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:="longueur"),2)) || ' m'

DINAMIQUE

'- ' || to_string(round(aggregate(
    layer:='stat',
    aggregate:='sum',
    expression:="longueur",
    filter:="ft" LIKE '%_DET_DETECT%' AND is_selected()
),2)) || ' m' || '\n' ||

'- ' || to_string(round(aggregate(
    layer:='stat',
    aggregate:='sum',
    expression:="longueur",
    filter:="ft" LIKE '%_DETECTION_PERT%' AND is_selected()
),2)) || ' m' || '\n' ||

'- ' || to_string(round(aggregate(
    layer:='stat',
    aggregate:='sum',
    expression:="longueur",
    filter:="ft" LIKE '%INACCESSIBLE%' AND is_selected()
),2)) || ' m' || '\n' ||

'- ' || to_string(round(aggregate(
    layer:='stat',
    aggregate:='sum',
    expression:="longueur",
    filter:="ft" LIKE '%CULTURE%' AND is_selected()
),2)) || ' m' || '\n' ||

'- ' || to_string(round(aggregate(
    layer:='stat',
    aggregate:='sum',
    expression:="longueur",
    filter:="ft" LIKE '%TRADI%' AND is_selected()
),2)) || ' m' || '\n' ||

'\n' || 'TS ' ||
to_string(round(aggregate(
    layer:='stat',
    aggregate:='sum',
    expression:="longueur",
    filter:=is_selected()
),2)) || ' m'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment