Last active
October 12, 2017 16:34
-
-
Save pigreco/197df427b3a71a83169ce908d1c8f7d6 to your computer and use it in GitHub Desktop.
dati dei punti e un box che li contiene, determina la posizione dei punti: alto, basso, destra o sinistra; da usare nelle etichette - vettore di copertura rettangolare
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CASE | |
WHEN | |
length( shortest_line( $geometry, boundary( @atlas_geometry ) ) ) < @dist_bordo | |
and | |
angle_at_vertex( shortest_line( $geometry, boundary( @atlas_geometry ) ) ,0) =180 | |
THEN 'Alto' | |
WHEN | |
length( shortest_line( $geometry, boundary( @atlas_geometry ))) <@dist_bordo | |
and | |
angle_at_vertex( shortest_line( $geometry, boundary( @atlas_geometry ) ),0 ) =0 | |
THEN 'Basso' | |
WHEN | |
length( shortest_line( $geometry, boundary( @atlas_geometry) ) ) <@dist_bordo | |
and | |
angle_at_vertex( shortest_line( $geometry, boundary( @atlas_geometry ) ),0 ) =270 | |
THEN 'Dx' | |
WHEN | |
length( shortest_line( $geometry, boundary( @atlas_geometry )) ) <@dist_bordo | |
and | |
angle_at_vertex( shortest_line( $geometry, boundary( @atlas_geometry ) ),0 )=90 | |
THEN 'Sx' | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment