Database Reference
In-Depth Information
$ psql -U me -d postgis_cookbook -f
hotspots.sql
3. When the import is completed, check the point fire data (hotspots) you just
imported in PostGIS. Each hotspot contains a bunch of useful information,
most notably, the geometry and acquisition date and time stored in the
acq_date and acq_time fields.Youcaneasilyseethatthefeaturesloaded
fromtheshapefilespanovereightconsecutivedaysusingthefollowingcom-
mand:
postgis_cookbook=# SELECT acq_date,
count(*) AS hotspots_count FROM
chp09.hotspots GROUP BY acq_date ORDER BY
acq_date;
The previous command will produce the following output:
acq_date | hotspots_count
------------+----------------
2013-05-27 | 5539
2013-05-28 | 10142
2013-05-29 | 6688
2013-05-30 | 7543
2013-05-31 | 6676
2013-06-01 | 7978
2013-06-02 | 9228
2013-06-03 | 3796
(8 rows)
How to do it...
Carry out the following steps:
1. WewillfirstcreateaWMSforthePostGIShotspotlayer.Createthemapfile
named hotspots.map in a directory accessible to the httpd (or IIS) user,
forexample, /var/www/data inLinux,and C:\ms4w\Apache\htdocs in
Windows, composed by the following code:
Search WWH ::




Custom Search