RaymanNg / 3D-Wind-Field

Visualize wind field on Cesium
https://raymanng.github.io/3D-Wind-Field/demo/
MIT License
398 stars 146 forks source link

What about using JSON data? #48

Open icemagno opened 3 years ago

icemagno commented 3 years ago

Hi Rayman,

I'm trying to decide wich tool I'll use to show wind particles in my Cesium. I have found this and yours.

Your tool is fast and pretty, but uses NC file. The other one uses JSON data extracted using GRIB2JSON and is what I need becaus my METOC GOV entity gives me this format (http://s0.cptec.inpe.br/oceano/blend/vsm/vsm_diario_ams/vsm.json) but it is very slow and ugly.

Can you point to me where in the code I can modify to use JSON data in this format (like the other tool? As you can see it is very simple and easy to understand.

I have some skills in JS but I found your code too big and with many classes. If you lead me in right direction I think I can do this job.

Thanks for your help.

By the way... can you make it more stand alone like the other one? I see you make all Cesium instances stuff inside your code. Leave this work to the user.

RaymanNg commented 3 years ago

It should not be difficult since the data process is decoupled with the rendering. You can add a function for loading JSON data in the dataProcess.js, and call your JSON loading function in the exposed function loadData. However, you should ensure that the data return from your JSON loading function should have the same structure as that of function loadNetCDF

icemagno commented 3 years ago

Ok... I'll see that. Thanks. Can you please keep this open so I can feed the thread with my progress?

RaymanNg commented 3 years ago

OK, actually I prefer letting the issue owners to close their own issues if they have been resolved.

ding991 commented 3 years ago

@icemagno Hello, I have the same question as you, how do you deal with this json form of data?

icemagno commented 3 years ago

@ding991 well ... I'm working on other things now and let this left without doing anything .... sorry.

ding991 commented 3 years ago

@icemagno well. Thanks