Skip to content

Commit 608744b

Browse files
committed
Conflicts: tilemill/deforestation-sad/project.mml
2 parents 18885c0 + 7ab7ac0 commit 608744b

33 files changed

+69
-367
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
.Spotlight-V100
77
.Trashes
88
ehthumbs.db
9-
Thumbs.db
9+
Thumbs.db
10+
tilemill/biodiversity/data/*

README.md

+4-60
Original file line numberDiff line numberDiff line change
@@ -72,71 +72,15 @@ Once the import is complete you will need to update and optimize the tables in y
7272

7373
## Deforestation data from Imazon SAD
7474

75-
Imazon publishes monthly deforestation alerts at this page:
75+
This project has moved to:
7676

77-
http://www.imazongeo.org.br/doc/downloads.php
78-
79-
In the `tile/deforestation-sad/data` folder you'll find a file named `alerts.shp`, which has all Imazon SAD information to date.
80-
81-
If you need to update this file, follow the instructions:
82-
83-
1) Download the latest file and unzip it to `data` folder. You should have only two shapefiles at you data folder, `alerts.shp` and the new one from Imazon SAD;<br>
84-
2) Open QGIS and select menu 'Vector' / 'Data Management Tools' / 'Merge Shapefile to One';<br>
85-
3) Select the `data` folder as the input directory;<br>
86-
4) Save the output shapefile as `alerts-new.shp` at `data` folder;<br>
87-
5) Open this file in QGIS, and use the code bellow in the the field calculator to update `area_ha` field: <br>
88-
89-
```
90-
CASE
91-
WHEN AREA > 0 THEN toReal(toInt(AREA * 10000)) /100
92-
WHEN area_km2 > 0 THEN toReal(toInt(area_km2 * 10000)) /100
93-
WHEN area_km2_ > 0 THEN toReal(toInt(area_km2_ * 10000)) /100
94-
WHEN F_AREA > 0 THEN toReal(toInt(F_AREA * 10000)) /100
95-
WHEN Shape_Area > 0 THEN toReal(toInt(Shape_Area * 10000)) /100
96-
END
97-
```
98-
6) Finally, in QGIS, save `alerts-new.shp` as `alerts.shp`, overwriting the old file;<br>
99-
7) Regenerate the map at TileMill;<br>
100-
8) Upload it to Mapbox;<br>
101-
9) Delete old files and commit changes to this repository.<br>
102-
103-
If you need to download all source files again, run these commands inside `tilemill\deforestion-sad\data` folder:
104-
105-
wget -r -nd -A "imazon_sad_desmatamento*.zip" -P sources http://www.imazongeo.org.br/doc/downloads.php
106-
unzip -j sources/\*.zip -d sources-expanded -j
107-
108-
You'll find the shapefiles uncompressed in `tilemill\deforestion-sad\data\sources-expanded`.
77+
https://github.com/oeco/tm-deforestation-sad
10978

11079
## Fires
11180

112-
These projects are also is being powered by the postgres database. They are broken out into separate projects so preserve interactivity for both the high-intensity (yellow) layer, and the recent fires layer (red). Data for both these layer has been included in the desmata.sql dump.
113-
114-
### Source
115-
116-
Monthly data should be requested at:
117-
118-
http://firms.modaps.eosdis.nasa.gov/download/
119-
120-
### Updating Fires
121-
122-
You can now import it with shp2pgsql. Again, note the `-a` flag that appends this data to the fires table rather than overwriting the existing table. Read more about shp2pgsql [here](http://www.bostongis.com/pgsql2shp_shp2pgsql_quickguide_20.bqg).
123-
124-
shp2pgsql -D -a july-merc.shp fires | psql -d amazonia
125-
126-
Before your changes will take a effect you will need to the `update-fires.sql` script:
127-
128-
psql -d amazonia -f update-fires.sql
129-
130-
After importing the FIRMS data, and running the update-fires.sql script, tilemill project for both high-intensity fires and recent fires should work.
131-
132-
__OPTIONAL:__ To load historical data yourself [re-projecting](http://mapbox.com/tilemill/docs/guides/optimizing-shapefiles/) your NASA shapefile to Google Mercator you will need to upload it with shp2pgsql. Be sure to call the table 'fires' as in the import command below:
133-
134-
shp2pgsql -D -a firms1961337193914.shp fires| psql -d amazonia
135-
136-
again, run the optimization script in `/maps-src`.
137-
138-
psql -d amazonia -f update-fires.sql
81+
This project has moved to:
13982

83+
https://github.com/oeco/tm-fires-nasa
14084

14185
## Mining (and protected areas)
14286

tilemill/biodiversity/.thumb.png

6.99 KB
Loading

tilemill/biodiversity/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
3+
# Source data
4+
5+
Providers:
6+
7+
- Global Biodiversity Information Facility (www.gbif.org);
8+
- IUCN Red List International Union for Conservation of Nature: has terrestrial mammals
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/vitor/Documents/MapBox/cache/82945364-10m-admin-0-countries/82945364-10m-admin-0-countries.dbf
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/vitor/Documents/MapBox/cache/82945364-10m-admin-0-countries/82945364-10m-admin-0-countries.index
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/vitor/Documents/MapBox/cache/82945364-10m-admin-0-countries/82945364-10m-admin-0-countries.prj
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/vitor/Documents/MapBox/cache/82945364-10m-admin-0-countries/82945364-10m-admin-0-countries.shp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/vitor/Documents/MapBox/cache/82945364-10m-admin-0-countries/82945364-10m-admin-0-countries.shx
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/vitor/Documents/MapBox/cache/82945364-10m-admin-0-countries/82945364-10m-admin-0-countries.zip

tilemill/biodiversity/project.mml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"bounds": [
3+
-180,
4+
-85.05112877980659,
5+
180,
6+
85.05112877980659
7+
],
8+
"center": [
9+
0,
10+
0,
11+
2
12+
],
13+
"format": "png",
14+
"interactivity": false,
15+
"minzoom": 0,
16+
"maxzoom": 22,
17+
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
18+
"Stylesheet": [
19+
"style.mss"
20+
],
21+
"Layer": [
22+
{
23+
"id": "countries",
24+
"name": "countries",
25+
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
26+
"geometry": "polygon",
27+
"Datasource": {
28+
"file": "http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.4.0/cultural/10m-admin-0-countries.zip",
29+
"type": "shape"
30+
}
31+
}
32+
],
33+
"scale": 1,
34+
"metatile": 2,
35+
"name": "Amazon Biodiversity",
36+
"description": ""
37+
}

tilemill/biodiversity/style.mss

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Map {
2+
background-color: #b8dee6;
3+
}
4+
5+
#countries {
6+
::outline {
7+
line-color: #85c5d3;
8+
line-width: 2;
9+
line-join: round;
10+
}
11+
polygon-fill: #fff;
12+
}

tilemill/deforestation-sad/.thumb.png

-16.7 KB
Binary file not shown.
-11.9 MB
Binary file not shown.

tilemill/deforestation-sad/data/alerts.prj

-1
This file was deleted.

tilemill/deforestation-sad/data/alerts.qpj

-1
This file was deleted.
-6.73 MB
Binary file not shown.
-157 KB
Binary file not shown.

tilemill/deforestation-sad/layers/alerts/alerts.dbf

-1
This file was deleted.

tilemill/deforestation-sad/layers/alerts/alerts.prj

-1
This file was deleted.

tilemill/deforestation-sad/layers/alerts/alerts.qpj

-1
This file was deleted.

tilemill/deforestation-sad/layers/alerts/alerts.shp

-1
This file was deleted.

tilemill/deforestation-sad/layers/alerts/alerts.shx

-1
This file was deleted.

tilemill/deforestation-sad/project.mml

-58
This file was deleted.

tilemill/deforestation-sad/style.mss

-22
This file was deleted.

tilemill/fires-intense/.thumb.png

-5.49 KB
Binary file not shown.

tilemill/fires-intense/project.mml

-66
This file was deleted.

tilemill/fires-intense/style.mss

-44
This file was deleted.

tilemill/fires-recent/.thumb.png

-17.8 KB
Binary file not shown.

tilemill/fires-recent/layers/countries

-1
This file was deleted.

tilemill/fires-recent/layers/firms3691338835514

-1
This file was deleted.

0 commit comments

Comments
 (0)