Skip to content

Commit

Permalink
adding antarctic icesheet rendering based on shapefiles from openstre…
Browse files Browse the repository at this point in the history
…etmapdata.com
  • Loading branch information
imagico committed May 11, 2015
1 parent 952b55c commit 89301f1
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 0 deletions.
25 changes: 25 additions & 0 deletions get-shapefiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ mkdir -p data/simplified-land-polygons-complete-3857
mkdir -p data/ne_110m_admin_0_boundary_lines_land
mkdir -p data/ne_10m_populated_places
mkdir -p data/land-polygons-split-3857
mkdir -p antarctica-icesheet-polygons-3857
mkdir -p antarctica-icesheet-outlines-3857

# world_boundaries
echo "dowloading world_boundaries..."
Expand Down Expand Up @@ -65,6 +67,27 @@ unzip $UNZIP_OPTS data/land-polygons-split-3857.zip \
land-polygons-split-3857/land_polygons.cpg \
-d data/

# antarctica-icesheet-polygons-3857
echo "dowloading antarctica-icesheet-polygons-3857..."
curl -z "data/antarctica-icesheet-polygons-3857.zip" -L -o "data/antarctica-icesheet-polygons-3857.zip" "http://data.openstreetmapdata.com/antarctica-icesheet-polygons-3857.zip"
echo "expanding antarctica-icesheet-polygons-3857..."
unzip $UNZIP_OPTS data/antarctica-icesheet-polygons-3857.zip \
antarctica-icesheet-polygons-3857/icesheet_polygons.shp \
antarctica-icesheet-polygons-3857/icesheet_polygons.shx \
antarctica-icesheet-polygons-3857/icesheet_polygons.prj \
antarctica-icesheet-polygons-3857/icesheet_polygons.dbf \
-d data/

# antarctica-icesheet-outlines-3857
echo "dowloading antarctica-icesheet-outlines-3857..."
curl -z "data/antarctica-icesheet-outlines-3857.zip" -L -o "data/antarctica-icesheet-outlines-3857.zip" "http://data.openstreetmapdata.com/antarctica-icesheet-outlines-3857.zip"
echo "expanding antarctica-icesheet-outlines-3857..."
unzip $UNZIP_OPTS data/antarctica-icesheet-outlines-3857.zip \
antarctica-icesheet-outlines-3857/icesheet_outlines.shp \
antarctica-icesheet-outlines-3857/icesheet_outlines.shx \
antarctica-icesheet-outlines-3857/icesheet_outlines.prj \
antarctica-icesheet-outlines-3857/icesheet_outlines.dbf \
-d data/

#process populated places
echo "processing ne_10m_populated_places..."
Expand All @@ -77,6 +100,8 @@ echo "indexing shapefiles"
shapeindex --shape_files \
data/simplified-land-polygons-complete-3857/simplified_land_polygons.shp \
data/land-polygons-split-3857/land_polygons.shp \
data/antarctica-icesheet-polygons-3857/icesheet_polygons.shp \
data/antarctica-icesheet-outlines-3857/icesheet_outlines.shp \
data/ne_10m_populated_places/ne_10m_populated_places_fixed.shp \
data/ne_110m_admin_0_boundary_lines_land/ne_110m_admin_0_boundary_lines_land.shp

Expand Down
44 changes: 44 additions & 0 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,28 @@
},
"advanced": {}
},
{
"name": "icesheet-poly",
"srs-name": "900913",
"geometry": "polygon",
"class": "",
"id": "icesheet-poly",
"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",
"Datasource": {
"type": "shape",
"file": "data/antarctica-icesheet-polygons-3857/icesheet_polygons.shp"
},
"extent": [
-180,
-85.05112877980659,
180,
85.05112877980659
],
"properties": {
"minzoom": 4
},
"advanced": {}
},
{
"name": "water-areas",
"srs-name": "900913",
Expand Down Expand Up @@ -274,6 +296,28 @@
},
"advanced": {}
},
{
"name": "icesheet-outlines",
"srs-name": "900913",
"geometry": "linestring",
"class": "",
"id": "icesheet-outlines",
"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",
"Datasource": {
"type": "shape",
"file": "data/antarctica-icesheet-outlines-3857/icesheet_outlines.shp"
},
"extent": [
-180,
-85.05112877980659,
180,
85.05112877980659
],
"properties": {
"minzoom": 4
},
"advanced": {}
},
{
"name": "water-lines",
"srs-name": "900913",
Expand Down
22 changes: 22 additions & 0 deletions project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,17 @@ Layer:
minzoom: 8
maxzoom: 11
advanced: {}
- id: "icesheet-poly"
name: "icesheet-poly"
class: ""
geometry: "polygon"
<<: *extents
Datasource:
file: "data/antarctica-icesheet-polygons-3857/icesheet_polygons.shp"
type: "shape"
properties:
minzoom: 4
advanced: {}
- id: "water-areas"
name: "water-areas"
class: ""
Expand Down Expand Up @@ -263,6 +274,17 @@ Layer:
properties:
minzoom: 10
advanced: {}
- id: "icesheet-outlines"
name: "icesheet-outlines"
class: ""
geometry: "linestring"
<<: *extents
Datasource:
file: "data/antarctica-icesheet-outlines-3857/icesheet_outlines.shp"
type: "shape"
properties:
minzoom: 4
advanced: {}
- id: "water-lines"
name: "water-lines"
class: "water-lines"
Expand Down
20 changes: 20 additions & 0 deletions shapefiles.mss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@
}
}

#icesheet-poly {
[zoom >= 6] {
polygon-fill: @glacier;
[zoom >= 8] {
polygon-pattern-file: url('symbols/glacier.png');
}
}
}

#icesheet-outlines {
[zoom >= 6] {
[ice_edge = 'ice_ocean'],
[ice_edge = 'ice_land'] {
line-dasharray: 4,2;
line-width: 0.75;
line-color: @glacier-line;
}
}
}

#builtup {
[zoom >= 8][zoom < 10] {
polygon-fill: #ddd;
Expand Down

0 comments on commit 89301f1

Please sign in to comment.