All examples By author By category About

rveciana

Drawing streamlines from a GeoTIFF file

This example shows how to draw streamlines for a vectorial field using d3js and Canvas.

To calculate the streamlines, the raster-streamlines library is used. To calculate the position of the small arrows at the middle of each line, the svg-path-properties library is used too.

The data is the wind from a sample WRF model, reprojected from Lambert Conformal to latlon so it can be drawn.

The wind speed is plotted under the barbs, using the d3-marching-squares library.