leaflet-velocity
Create a canvas visualization layer for direction and intensity of arbitrary velocities (e.g. wind, ocean current).
https://github.com/onaci/leaflet-velocity
Category: Hydrosphere
Sub Category: Waves and Currents
Keywords
current leaflet ocean velocity visualisation visualization water weather wind
Keywords from Contributors
archiving measur transforms observation conversion generic optimize animals compose projection
Last synced: about 21 hours ago
JSON representation
Repository metadata
Visualise velocity data on a leaflet layer
- Host: GitHub
- URL: https://github.com/onaci/leaflet-velocity
- Owner: onaci
- License: other
- Created: 2017-02-05T23:47:04.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-10-19T17:29:10.000Z (over 1 year ago)
- Last Synced: 2025-04-19T13:58:51.726Z (8 days ago)
- Topics: current, leaflet, ocean, velocity, visualisation, visualization, water, weather, wind
- Language: JavaScript
- Homepage: https://onaci.github.io/leaflet-velocity/
- Size: 5.82 MB
- Stars: 623
- Watchers: 26
- Forks: 216
- Open Issues: 25
- Releases: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Citation: CITATION.cff
README.md
Version 2 Notice
As of version 2, leaflet-velocity
is now under CSIRO's Open Source Software Licence Agreement, which is variation of the BSD / MIT License.
There are no other plans for changes to licensing, and the project will remain open source.
A plugin for Leaflet (v1.0.3, and v0.7.7) to create a canvas visualisation layer for direction and intensity of arbitrary velocities (e.g. wind, ocean current).
Live Demo: https://onaci.github.io/leaflet-velocity/
- Uses a modified version of WindJS for core functionality.
- Similar to wind-js-leaflet, however much more versatile (provides a generic leaflet layer, and not restricted to wind).
- Data input format is the same as output by wind-js-server, using grib2json.
Example use:
var velocityLayer = L.velocityLayer({
displayValues: true,
displayOptions: {
// label prefix
velocityType: "Global Wind",
// leaflet control position
position: "bottomleft",
// no data at cursor
emptyString: "No velocity data",
// see explanation below
angleConvention: "bearingCW",
// display cardinal direction alongside degrees
showCardinal: false,
// one of: ['ms', 'k/h', 'mph', 'kt']
speedUnit: "ms",
// direction label prefix
directionString: "Direction",
// speed label prefix
speedString: "Speed",
},
data: data, // see demo/*.json, or wind-js-server for example data service
// OPTIONAL
minVelocity: 0, // used to align color scale
maxVelocity: 10, // used to align color scale
velocityScale: 0.005, // modifier for particle animations, arbitrarily defaults to 0.005
colorScale: [], // define your own array of hex/rgb colors
onAdd: null, // callback function
onRemove: null, // callback function
opacity: 0.97, // layer opacity, default 0.97
// optional pane to add the layer, will be created if doesn't exist
// leaflet v1+ only (falls back to overlayPane for < v1)
paneName: "overlayPane",
});
The angle convention option refers to the convention used to express the wind direction as an angle from north direction in the control.
It can be any combination of bearing
(angle toward which the flow goes) or meteo
(angle from which the flow comes),
and CW
(angle value increases clock-wise) or CCW
(angle value increases counter clock-wise). If not given defaults to bearingCCW
.
The speed unit option refers to the unit used to express the wind speed in the control.
It can be m/s
for meter per second, k/h
for kilometer per hour or kt
for knots. If not given defaults to m/s
.
Public methods
method | params | description |
---|---|---|
setData |
{Object} |
update the layer with new data |
setOptions |
{Object} |
update the layer with new options |
Build / watch
npm run watch
Reference
leaflet-velocity
is possible because of things like:
Example data
Data shown for the Great Barrier Reef has been derived from CSIRO's eReefs products
License
CSIRO Open Source Software Licence Agreement (variation of the BSD / MIT License)
Citation (CITATION.cff)
cff-version: 1.2.0 title: Leaflet Velocity version: 2.1.2 message: 'If you use this software, please cite it as below.' type: software url: "https://github.com/onaci/leaflet-velocity" authors: - given-names: Daniel Wild family-names: Wild email: [email protected] affiliation: >- Commonwealth Scientific and Industrial Research Organisation (CSIRO) orcid: 'https://orcid.org/0000-0002-5127-2327'
Owner metadata
- Name: CSIRO Oceans and Atmosphere - Coastal Informatics Team
- Login: onaci
- Email:
- Kind: organization
- Description:
- Website: https://www.csiro.au/en/about/people/business-units/Oceans-and-Atmosphere
- Location: Australia
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/34732655?v=4
- Repositories: 13
- Last ynced at: 2023-03-05T00:31:48.946Z
- Profile URL: https://github.com/onaci
GitHub Events
Total
- Issues event: 2
- Watch event: 31
- Issue comment event: 6
- Fork event: 7
Last Year
- Issues event: 2
- Watch event: 31
- Issue comment event: 6
- Fork event: 7
Committers metadata
Last synced: 6 days ago
Total Commits: 108
Total Committers: 10
Avg Commits per committer: 10.8
Development Distribution Score (DDS): 0.343
Commits in past year: 1
Committers in past year: 1
Avg Commits per committer in past year: 1.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
Dan Wild | d****d@y****m | 71 |
dependabot[bot] | 4****] | 18 |
Luc Claustres | l****s@o****r | 5 |
brentfraser | b****r@g****m | 3 |
Gustavo Porto | g****o@q****m | 2 |
Olegas Goncarovas | o****n@s****m | 2 |
Myles McManus | m****c@g****m | 2 |
Phil Krull | p****l@f****m | 2 |
Seth Lutske | 5****2 | 2 |
Pierre Vernier | p****2@g****m | 1 |
Committer domains:
- fivepackcreative.com: 1
- stormgeo.com: 1
- quanticosolutions.com: 1
- geoanalytic.com: 1
- orange.fr: 1
- y7mail.com: 1
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 68
Total pull requests: 36
Average time to close issues: 5 months
Average time to close pull requests: 29 days
Total issue authors: 58
Total pull request authors: 11
Average comments per issue: 2.24
Average comments per pull request: 0.25
Merged pull request: 30
Bot issues: 0
Bot pull requests: 21
Past year issues: 3
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 3
Past year pull request authors: 0
Past year average comments per issue: 0.0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- claustres (3)
- tkrueger73 (3)
- SFSailor (2)
- AugustinMortier (2)
- leoGrg (2)
- kt7456 (2)
- xelaboy (2)
- maihannijat (2)
- crazyfrog30 (1)
- ghybs (1)
- cookmaster (1)
- saltynexus (1)
- shahidabbas37 (1)
- dceejay (1)
- harksin (1)
Top Pull Request Authors
- dependabot[bot] (21)
- claustres (4)
- brentfraser (2)
- ogix (2)
- pvernier (1)
- slutske22 (1)
- MikeScheurwater (1)
- hotfudgecake (1)
- portothree (1)
- phil-krull (1)
- mylesmc123 (1)
Top Issue Labels
- enhancement (1)
- help wanted (1)
- question (1)
Top Pull Request Labels
- dependencies (21)
Package metadata
- Total packages: 1
-
Total downloads:
- npm: 6,439 last-month
- Total docker downloads: 767
- Total dependent packages: 9
- Total dependent repositories: 58
- Total versions: 38
- Total maintainers: 1
npmjs.org: leaflet-velocity
A custom layer for leaflet to visualise arbitrary velocities
- Homepage: https://github.com/onaci/leaflet-velocity#readme
- Licenses: See LICENSE in LICENSE.md
- Latest release: 2.1.4 (published about 2 years ago)
- Last Synced: 2025-04-26T14:03:06.252Z (about 21 hours ago)
- Versions: 38
- Dependent Packages: 9
- Dependent Repositories: 58
- Downloads: 6,439 Last month
- Docker Downloads: 767
-
Rankings:
- Docker downloads count: 1.023%
- Downloads: 1.202%
- Dependent repos count: 1.83%
- Average: 1.952%
- Dependent packages count: 2.178%
- Forks count: 2.405%
- Stargazers count: 3.074%
- Maintainers (1)
Dependencies
- 691 dependencies
- @babel/core ^7.5.4 development
- @babel/preset-env ^7.5.4 development
- babel-preset-es2015 ^6.9.0 development
- cssnano ^4.1.10 development
- gulp ^4.0.2 development
- gulp-babel ^8.0.0 development
- gulp-concat ^2.6.1 development
- gulp-concat-css ^3.1.0 development
- gulp-postcss ^8.0.0 development
- gulp-rename ^1.4.0 development
- gulp-uglify ^3.0.2 development
Score: 17.669773933564237