Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 1.55 KB

README.md

File metadata and controls

23 lines (20 loc) · 1.55 KB

@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.