Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
questo gist segue il gist 'dove mi trovo'; è da utilizzare nel posizionamento delle etichette - metodo cartographic- position priority - vettore di copertura generico
CASE
WHEN
length( shortest_line( $geometry, boundary( bounds( @atlas_geometry ) ) ) ) < @dist_bordo
and
angle_at_vertex( shortest_line( $geometry, boundary( bounds( @atlas_geometry ) ) ) ,0) =180
THEN 'TSL'
WHEN
length( shortest_line( $geometry, boundary( bounds( @atlas_geometry ) ))) <@dist_bordo
and
angle_at_vertex( shortest_line( $geometry, boundary( bounds( @atlas_geometry ) ) ),0 ) =0
THEN 'BSR'
WHEN
length( shortest_line( $geometry, boundary( bounds( @atlas_geometry) ) ) ) <@dist_bordo
and
angle_at_vertex( shortest_line( $geometry, boundary( bounds( @atlas_geometry ) ) ),0 ) =270
THEN 'R'
WHEN
length( shortest_line( $geometry, boundary( bounds( @atlas_geometry ) )) ) <@dist_bordo
and
angle_at_vertex( shortest_line( $geometry, boundary( bounds( @atlas_geometry ) ) ),0 )=90
THEN 'L'
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment