Skip to main content
14 events
when toggle format what by license comment
Oct 29, 2023 at 20:57 comment added alphabetasoup You can replace that incredibly long list with something like (x * 0.1 for x in range(0, 526)) to get [0,0.1,...55.4,55.5] in 0.1 increments.
Mar 18, 2019 at 10:26 comment added CaptainAhab I've done some more testing. I went back to using SVG symbology and put the coding in the data-driven override at the "enable layer" position. This seems to put less strain on the system if(round(format_date(now(),'s.z'), 1) IN (0.0,1.0,2.0,3.0,4.0,5.0,6.0,6.5,7.0,7.5,15.0,16.0,17.0,18.0,19.0,20.0,21.0,21.5,22.0,22.5,30.0,31.0,32.0,33.0,34.0,35.0,36.0,36.5,37.0,37.5,45.0,46.0,47.0,48.0,49.0,50.0,51.0,51.5,52.0,52.5 ),'1','0')
Feb 2, 2019 at 21:22 comment added Gabriel Yes that's why I wrote "Another issue is that for huge layers with large numbers of features, this is probably not viable to refresh at 10hz..." it's probably a too large load. Don't hesitate to unmark it as accepted answer if it's not a workable solution. Maybe a feature request for animations in SVGs in QGIS could be an interesting path.
Feb 2, 2019 at 20:41 comment added CaptainAhab I coded all the light characters using the "to_real(format_date(now(),'s.z'))" method. It's most likely a hardware issue on my part but 0.1 refresh in render gave me weird characters. I set the time to 0.5 and that worked perfect. Downside is that characters with an 0.5 burst won't show. I do think this is asking a lot. I ran "top" (debian CPU performance monitor) and my CPU load on QGIS changed from 1% to 77%.
Jan 29, 2019 at 21:13 vote accept CaptainAhab
Jan 29, 2019 at 17:15 history edited Gabriel CC BY-SA 4.0
Fleshed out the answer
Jan 28, 2019 at 23:25 comment added Gabriel to_real(format_date(now(),'s.z')) returns the milliseconds, but I'm unable to get the symbology to work with it. Needs more testing.
Jan 28, 2019 at 22:29 comment added MrXsquared Using if(epoch(now()) % 5,'red','blue') and setting refresh rate to 0,05 seems to "work", but it also seems like QGIS comes to its limit as the blinking is no longer consistently. Wouldnt really recommend. Edit: should be % 500 i think. But this seems to not work at all..
Jan 28, 2019 at 22:18 comment added MrXsquared Indeed. Only expression available in QGIS that works with milliseconds is epoch(). But not sure yet how an expression using this could look like in the end. Maybe this could be done with a custom python script in function editor.
Jan 28, 2019 at 22:10 comment added Gabriel Definitely could have. I should tidy up this answer a bit. The only issue I see with all this is that it won't permit a blinking shorter than 1 second, I fear.
Jan 28, 2019 at 22:04 comment added MrXsquared To shorten up things you can use if(second(now()) % 5,'red','blue')
Jan 28, 2019 at 21:55 comment added MrXsquared Was ending up with the same thing. But I failed changing the refresh rate of map canvas. Now QGIS crashes everytime I hit OK button in settings menu (no matter if I change settings or not). So I want to add this warning: Do not change refresh rate in Settings --> Options but as described in this answer in Layer Properties; This works just fine.
Jan 28, 2019 at 21:55 history edited Gabriel CC BY-SA 4.0
added 54 characters in body
Jan 28, 2019 at 21:50 history answered Gabriel CC BY-SA 4.0