firelab / windninja-mobile

Mobile application for WindNinja
0 stars 0 forks source link

Slow graphics when plotting coarse weather model vectors #27

Closed jforthofer closed 8 years ago

jforthofer commented 9 years ago

In the new 0.1.8 version, the coarse weather model wind vectors are plotted using the "vector" method which allows them to be turned on and off. The problem I am having on my phone (Samsung S5) is that when I zoom way out so I see all these vectors, things get slow again most likely because it's just too many vectors for my phone to handle well. I wonder if there's anything we can do about this, such as clip down the area that these vectors are plotted at. Could this be done in WindNinja? Possibly Natalie could revisit this code in WindNinja to see what we are doing and if we can clip it smaller... Another possible speed up could be to not plot the blue vectors around the border, because these are essentially NO_DATA values that occurred due to reprojection.

CorbyHarkonnen commented 9 years ago

it might speed things up a bit if I enable clustering on the coarse weather outputs as well, I didn't enable it for this build as we didn't think it would have that much of an impact on the speed given that there are far fewer points when compared to the standard windninja output, but this was apparently an incorrect assumption. I'll enable clustering and do some testing on my older phone (Samsung S3) to see if it improves things.

is there a size extent that would work well for clipping this? say 2x the run domain?

fspataro-zz commented 9 years ago

Below is picture of the "weather" vs "run". The yellow dots are "0" which could easily be excluded but that only takes out about 2k of the 7k dots. That still leaves quite a lot especially given the extent of the run. Should I double (or more?) the extent of the run and clip just those points?

image

nwagenbrenner commented 9 years ago

I think firelab/windninja@2fee43d should fix this issue. For the mobile app we now only clip out a wx grid with a buffer that is 3 * the wx model grid resolution, so there will be a lot fewer vectors to draw. Enable MOBILE_APP in cmake to use this.

jforthofer commented 8 years ago

This still doesn't seem fixed to me. A HRRR run near Missoula still shows a lot of coarse model vectors. Did whoever compiled WindNinja on the server forget to enable MOBILE_APP in cmake, or is this not properly fixed in the WindNinja code?

CorbyHarkonnen commented 8 years ago

I do a little bit of culling in the app itself (anything with a 0 value is discarded - like Fred suggested above), but this only takes care of a small portion of the extra data. Not sure on the server build options of WindNinja though.

nwagenbrenner commented 8 years ago

WindNinja was never built with MOBILE_APP=ON (as noted above). I'll rebuild on the server and switch this on then we can re-test.

nwagenbrenner commented 8 years ago

Just re-built it. Jason, you can try another run if you want.

jforthofer commented 8 years ago

That was the problem... fixed now. Closing...