How to do it...

Carry out the following steps:

  1. We will first create a WMS for the PostGIS hotspot layer. Create a mapfile named hotspots.map in a directory accessible to the HTTPD (or IIS) user (for example, /var/www/data in Linux, /Library/WebServer/Documents/ for macOS, and C:\ms4w\Apache\htdocs in Windows), by executing the following code after adjusting the database connection settings:
 MAP # Start of mapfile NAME 'hotspots_time_series' IMAGETYPE PNG EXTENT -180 -90 180 90 SIZE 800 400 IMAGECOLOR 255 255 255 # map projection definition PROJECTION 'init=epsg:4326' END # a symbol for hotspots SYMBOL NAME "circle" TYPE ellipse FILLED true POINTS 1 1 END END # web section: here we define the ows services WEB # WMS and WFS server settings ...

Get PostGIS Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.