This is the repository for TileMill project of maps for intense and recent fires at infoamazonia.org.
-
Clone this repository at your machine;
-
Symlink TileMill projects:
ln -s /path/to/repository/tilemill/fires-intense ~/Documents/Mapbox/project ln -s /path/to/repository/tilemill/fires-recent ~/Documents/Mapbox/project
-
Download new data setting extents (West South East North) = (-85 -59 -29 16):
-
Unzip the downloaded file at
data
folder; -
Import downloaded files, replacing {new_data_file} with downloaded filename without extension:
cd data spatialite_tool -i -shp {new_data_file} -d fires.sqlite -t fires -c UTF-8 -s 4326 spatialite fires.sqlite < ../sql/update.sql
-
Regenerate maps and upload to Mapbox:
-
Commit changes to GitHub.
If you need to regenate from scratch, download source files spliting by 3-4 years periods, e.g. 2000 to 2003, 2004-2006, 2007-2009,2010-2012, and so forth.
Merge then:
ogr2ogr -select "ACQ_DATE","BRIGHTNESS","FRP" fires.shp fires_2000-2003.shp
ogr2ogr -append -select "ACQ_DATE","BRIGHTNESS","FRP" fires.shp fires_2004-2006.shp
ogr2ogr -append -select "ACQ_DATE","BRIGHTNESS","FRP" fires.shp fires_2007-2009.shp
ogr2ogr -append -select "ACQ_DATE","BRIGHTNESS","FRP" fires.shp fires_2010-2012.shp
ogr2ogr -append -select "ACQ_DATE","BRIGHTNESS","FRP" fires.shp fires_2013.shp
Init a Spatialite database with this data:
spatialite_tool -i -shp data/fires -d data/fires.sqlite -t fires -c UTF-8 -s 4326
Create recent and intense tables:
spatialite data/fires.sqlite < sql/create.sql