onaci / leaflet-velocity

Visualise velocity data on a leaflet layer

Home Page:https://onaci.github.io/leaflet-velocity/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How would I use my own wind data with leaflet-velocity?

jhread7 opened this issue · comments

I have a network of weather stations that report wind speed and direction, I am wondering if/how I could use my data with leaflet-velocity. I took a look at the out.json file from the wind-js-server package and see that there is a lot more information there than what I could provide. I only have coordinates and a velocity for each station, so I am not sure if that is enough. What data does leaflet-velocity require? Thanks in advance.

Typically leaflet-velocity uses data from organizations that produce a grid of speed and direction values in the form of u/v (x/y) vector components. These grids could be calculated from randomly spaced point sources (like your station network) using tools like gdal_grid , then translate the grid to the leaflet-velocity json format. Not easy, but not impossible.

Hi @jhread7 , the issue tracker is really just for reporting problems with the leaflet-velocity plugin itself, and not suitable for help requests. For questions/discussions of that nature you'd be much better off over at stack overflow.

Saying that - I think it depends largely on the density of your weather stations (if they are sparse you are probably not going to get great results as leaflet-velocity is designed for gridded datasets).

All the best,
Dan