Skip to content

Creates storm signal image files based on a pagasa-parser Bulletin.

License

Notifications You must be signed in to change notification settings

pagasa-parser/formatter-signals

Repository files navigation

@pagasa-parser/formatter-signals

npm version npm downloads

This plugin for pagasa-parser allows for the creation of colored SVG maps with appropriate legends including a province's current Tropical Cyclone Warning System level. It is aimed to be a faithful recreation of the PAGASA-provided signal maps, albeit with a higher (vectorized) quality and configurability.

Some processing is done in different stages of execution:

  • Pre-runtime:
    • Initializing static features of the map, such as changing its background color.
    • Building the package for use.
  • Runtime:
    • Actual execution and processing of the Bulletin object.
    • Changing the colors of each province on the map to their respective TCWS levels.
    • Cropping the map only to include parts which have raised signals, with extra space for legends.
    • Changing the stroke width for municipalities and provinces for clarity on smaller scales.
    • (to do) Adding the legends and province names.
    • (to do) Rendering the image, if creating a raster file.

Developing

Make sure to run node scripts/map-generator.js to generate the base map. If you're using the npm package, there's no need to perform this step as the base map is prepackaged.

About

Creates storm signal image files based on a pagasa-parser Bulletin.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published