Skip to content
/ wind-js Public
forked from Esri/wind-js

An demo animation of wind on a Canvas layer in the JSAPI

License

Notifications You must be signed in to change notification settings

gijs/wind-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wind-JS

Wind JS

This project is an experiment in client-side data processing and visualization. Most of the code in this projest is taken from https://github.com/cambecc/earth and has been re-purposed to support easier application to a variety of mapping APIs and Frameworks.

How it works

The code for this project uses nothing but an HTML5 Canvas element and pure Javascript. The data come from the Global Forecast System which produces a large variety of datasets as continuous global gridded datasets (more info below). The data is passed into a JS class called Windy which takes the bounds of the map, the data, and the canvas element and then applies a Bilinear Interpolation to generate a smooth surface. Once the surface has been generated a function randomly places "particles" onto canvas at random x/y points. Each particle is then "evolved", moving in a direction and at a velocity that is dictated by the interpolated surface.

The Demo

http://esri.github.io/wind-js/

The Data

For more information about GFS data visit: GFS Data.

Before GFS data can be used with this code it has to be converted into JSON. Do this we used another awesome project by @cambecc here https://github.com/cambecc/grib2json. That tool convert data in the GRIB2 file format into a JSON structure with the grid represented as an array. An example result of that tool can be seen in the gfs.json file.

Resources

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Credit

All the credit for this work goes to: https://github.com/cambecc for creating the repo: https://github.com/cambecc/earth. The majority of this code is directly taken from there, since it's utterly awesome.

Licensing

Copyright 2014 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's license.txt file.

[](Esri Tags: ArcGIS Web Mapping Visualization Wind Canvas Animation) [](Esri Language: JavaScript)

About

An demo animation of wind on a Canvas layer in the JSAPI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published