Skip to main content
added 306 characters in body
Source Link
Babel
  • 74.9k
  • 15
  • 87
  • 227

Solution: Geometry Generator for performance

The solution by christophe using SVG is great for static output, let's say for print. However, in this project with several hundred symbols, rendering all the svg symbols including different size and containing attribute data takes enormously long and every change in the canvas (pan, zoom) starts a new rendering cycle. So for dynamic use, Geometry Generator (see here for details) has some advantages. You can use geometry generator to have full controll of all settings.

How to implement it

Text size

Update: Further styling and setting scale visibility allows for fine tunig, see an example here (zoom in to see the text diagrams appear one after the other - first the bigger ones, by zooming more the smaller ones as well): https://qgiscloud.com/daur/textdiagramm_cd/

The solution by christophe using SVG is great for static output, let's say for print. However, in this project with several hundred symbols, rendering all the svg symbols including different size and containing attribute data takes enormely long and every change in the canvas (pan, zoom) starts a new rendering cycle. So for dynamic use, geometry generator has some advantages.

You can use geometry generator to have full controll of all settings.

Update: Further styling and setting scale visibility allows for fine tunig, see an example here (zoom in to see the text diagrams appear one after the other - first the bigger ones, by zooming more the smaller ones as well): https://qgiscloud.com/daur/textdiagramm_cd/

The solution by christophe using SVG is great for static output, let's say for print. However, in this project with several hundred symbols, rendering all the svg symbols including different size and containing attribute data takes enormely long and every change in the canvas (pan, zoom) starts a new rendering cycle. So for dynamic use, geometry generator has some advantages.

Solution: Geometry Generator for performance

The solution by christophe using SVG is great for static output, let's say for print. However, in this project with several hundred symbols, rendering all the svg symbols including different size and containing attribute data takes enormously long and every change in the canvas (pan, zoom) starts a new rendering cycle. So for dynamic use, Geometry Generator (see here for details) has some advantages. You can use geometry generator to have full controll of all settings.

How to implement it

Text size

Update: Further styling and setting scale visibility allows for fine tunig, see an example here (zoom in to see the text diagrams appear one after the other - first the bigger ones, by zooming more the smaller ones as well): https://qgiscloud.com/daur/textdiagramm_cd/

added 656 characters in body
Source Link
Babel
  • 74.9k
  • 15
  • 87
  • 227

Update: Further styling and setting scale visibility allows for fine tunig, see an example here (zoom in to see the text diagrams appear one after the other - first the bigger ones, by zooming more the smaller ones as well): https://qgiscloud.com/daur/textdiagramm_cd/

The solution by christophe using SVG is great for static output, let's say for print. However, in this project with several hundred symbols, rendering all the svg symbols including different size and containing attribute data takes enormely long and every change in the canvas (pan, zoom) starts a new rendering cycle. So for dynamic use, geometry generator has some advantages.

Update: Further styling and setting scale visibility allows for fine tunig, see an example here (zoom in to see the text diagrams appear one after the other - first the bigger ones, by zooming more the smaller ones as well): https://qgiscloud.com/daur/textdiagramm_cd/

The solution by christophe using SVG is great for static output, let's say for print. However, in this project with several hundred symbols, rendering all the svg symbols including different size and containing attribute data takes enormely long and every change in the canvas (pan, zoom) starts a new rendering cycle. So for dynamic use, geometry generator has some advantages.

deleted 40 characters in body
Source Link
Babel
  • 74.9k
  • 15
  • 87
  • 227
make_line(
   (project
      (
         centroid($geometry), 
         "radius"/6,  
         2*pi()-( asin(
            sqrt(("radius"/6 * "radius"/6)-("radius"/183 * "radius"/183)) / ("radius"/6))
            )
      )
      ),
   (project
      (
         centroid($geometry), 
         "radius"/6,  
         asin(
            sqrt(("radius"/6 * "radius"/6)-("radius"/183 * "radius"/183)) / ("radius"/6)
            )
       )
   )
)
make_line(

   project(
      centroid($geometry),
      "radius"/6,
      1*pi()-( asin(
         sqrt( (("radius"/6 * "radius"/6)-("radius"/183 * "radius"/183))) / ("radius"/6))
      )
    ),

    project(
       centroid($geometry),
       "radius"/6,
       pi()+ ( asin(
          sqrt((("radius"/6 * "radius"/6)-("radius"/183 * "radius"/183))) / ("radius"/6))
       )
    )

)
make_line(
   (project
      (
         centroid($geometry), 
         "radius"/6,  
         2*pi()-( asin(
            sqrt(("radius"/6 * "radius"/6)-("radius"/18 * "radius"/18)) / ("radius"/6))
            )
      )
      ),
   (project
      (
         centroid($geometry), 
         "radius"/6,  
         asin(
            sqrt(("radius"/6 * "radius"/6)-("radius"/18 * "radius"/18)) / ("radius"/6)
            )
       )
   )
)
make_line(

   project(
      centroid($geometry),
      "radius"/6,
      1*pi()-( asin(
         sqrt( (("radius"/6 * "radius"/6)-("radius"/18 * "radius"/18))) / ("radius"/6))
      )
    ),

    project(
       centroid($geometry),
       "radius"/6,
       pi()+ ( asin(
          sqrt((("radius"/6 * "radius"/6)-("radius"/18 * "radius"/18))) / ("radius"/6))
       )
    )

)
make_line(
   (project
      (
         centroid($geometry), 
         "radius",  
         2*pi()-( asin(
            sqrt(("radius" * "radius")-("radius"/3 * "radius"/3)) / ("radius"))
            )
      )
      ),
   (project
      (
         centroid($geometry), 
         "radius",  
         asin(
            sqrt(("radius" * "radius")-("radius"/3 * "radius"/3)) / ("radius")
            )
       )
   )
)
make_line(

   project(
      centroid($geometry),
      "radius",
      1*pi()-( asin(
         sqrt( (("radius" * "radius")-("radius"/3 * "radius"/3))) / ("radius"))
      )
    ),

    project(
       centroid($geometry),
       "radius",
       pi()+ ( asin(
          sqrt((("radius" * "radius")-("radius"/3 * "radius"/3))) / ("radius"))
       )
    )

)
added 1947 characters in body
Source Link
Babel
  • 74.9k
  • 15
  • 87
  • 227
Loading
Source Link
Babel
  • 74.9k
  • 15
  • 87
  • 227
Loading