Skip to content
Straight-forward API server to convert rain area radar images (Singapore) to GeoJSON
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
functions
.gitignore
README.md
index.js
now.json
package-lock.json
package.json
radar2geojson.png
sg-region-boundary.json

README.md

Rain GeoJSON SG

Straight-forward API server to convert rain area radar images (Singapore) to GeoJSON.

Convert rain area radar image to GeoJSON

  • 50-km radar images: Weather.gov.sg
  • 70-km radar images: MyENV apps
  • Radar images are generated every 5 minutes.
  • Raster image is converted to GeoJSON, pixel by pixel. From pixels to polygons.
  • Polygons in GeoJSON are grouped by color/intensity into MultiPolygons. Adjacent polygons are unioned/combined.
  • Intensity values are improvised to be 0-100. These may not be standard/scientific values. They are reverse-engineered from the rain intensity color scheme (Light → Moderate → Heavy).
  • Only the latest GeoJSON data is cached and will updated every few minutes.

Try it out

URL: https://rain-geojson-sg.now.sh/

Technicalities

Node.js is required to run this server. These are the commands:

  • npm i - install all dependencies
  • npm run dev - run a development server
  • npm start - run a production server

The URLs:

  • / - return a basic JSON of basic information
  • /now - return the GeoJSON result of latest radar image

Copyright/License

You can’t perform that action at this time.