Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reenable basic glacier rendering in Antarctica #646

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions get-shapefiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ unzip $UNZIP_OPTS data/simplified-land-polygons-complete-3857.zip \
simplified-land-polygons-complete-3857/simplified_land_polygons.cpg \
-d data/

ogr2ogr -spat -20037509 -8400000 20037509 20037509 data/simplified-land-polygons-complete-3857/simplified_land_north.shp data/simplified-land-polygons-complete-3857/simplified_land_polygons.shp
ogr2ogr -spat -20037509 -20037509 20037509 -8400000 data/simplified-land-polygons-complete-3857/simplified_land_south.shp data/simplified-land-polygons-complete-3857/simplified_land_polygons.shp


# ne_110m_admin_0_boundary_lines_land
echo "dowloading ne_110m_admin_0_boundary_lines_land..."
curl -z data/ne_110m_admin_0_boundary_lines_land.zip -L -o data/ne_110m_admin_0_boundary_lines_land.zip http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip
Expand Down Expand Up @@ -65,6 +69,8 @@ unzip $UNZIP_OPTS data/land-polygons-split-3857.zip \
land-polygons-split-3857/land_polygons.cpg \
-d data/

ogr2ogr -spat -20037509 -8400000 20037509 20037509 data/land-polygons-split-3857/land_north.shp data/land-polygons-split-3857/land_polygons.shp
ogr2ogr -spat -20037509 -20037509 20037509 -8400000 data/land-polygons-split-3857/land_south.shp data/land-polygons-split-3857/land_polygons.shp

#process populated places
echo "processing ne_10m_populated_places..."
Expand All @@ -78,8 +84,11 @@ shapeindex --shape_files \
data/simplified-land-polygons-complete-3857/simplified_land_polygons.shp \
data/land-polygons-split-3857/land_polygons.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

data/ne_110m_admin_0_boundary_lines_land/ne_110m_admin_0_boundary_lines_land.shp \
data/land-polygons-split-3857/land_south.shp \
data/land-polygons-split-3857/land_north.shp \
data/simplified-land-polygons-complete-3857/simplified_land_north.shp \
data/simplified-land-polygons-complete-3857/simplified_land_south.shp

#clean up
echo "cleaning up..."
Expand Down
46 changes: 42 additions & 4 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
"geometry": "polygon",
"extent": [
-179.99999692067183,
-85.05112877980659,
-60,
179.99999692067183,
85.05112877980659
],
"id": "world",
"class": "",
"Datasource": {
"file": "data/simplified-land-polygons-complete-3857/simplified_land_polygons.shp",
"file": "data/simplified-land-polygons-complete-3857/simplified_land_north.shp",
"type": "shape"
},
"srs-name": "900913",
Expand All @@ -60,19 +60,57 @@
-179.99999692067183,
-85.05112877980659,
179.99999692067183,
-60
],
"id": "world-south",
"class": "",
"Datasource": {
"file": "data/simplified-land-polygons-complete-3857/simplified_land_south.shp",
"type": "shape"
},
"srs-name": "900913",
"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",
"advanced": {},
"name": "world-south"
},
{
"geometry": "polygon",
"extent": [
-179.99999692067183,
-60,
179.99999692067183,
85.05112877980659
],
"id": "coast-poly",
"class": "",
"Datasource": {
"file": "data/land-polygons-split-3857/land_polygons.shp",
"file": "data/land-polygons-split-3857/land_north.shp",
"type": "shape"
},
"srs-name": "900913",
"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",
"advanced": {},
"name": "coast-poly"
},
{
"geometry": "polygon",
"extent": [
-179.99999692067183,
-85.051,
179.99999692067183,
-60
],
"id": "coast-poly-south",
"class": "",
"Datasource": {
"file": "data/land-polygons-split-3857/land_south.shp",
"type": "shape"
},
"srs-name": "900913",
"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",
"advanced": {},
"name": "coast-poly-south"
},
{
"geometry": "polygon",
"extent": [
Expand Down Expand Up @@ -213,7 +251,7 @@
],
"Datasource": {
"type": "postgis",
"table": " (select way,\"natural\",waterway,landuse,name\n from planet_osm_polygon\n where (waterway in ('dock','mill_pond','riverbank','canal')\n or landuse in ('reservoir','water','basin')\n or \"natural\" in ('lake','water','land','glacier','mud'))\n and building is null\n order by z_order,way_area desc\n ) as water_areas",
"table": " (select way,way_area,\"natural\",waterway,landuse,name\n from planet_osm_polygon\n where (waterway in ('dock','mill_pond','riverbank','canal')\n or landuse in ('reservoir','water','basin')\n or \"natural\" in ('lake','water','land','glacier','mud'))\n and building is null\n order by z_order,way_area desc\n ) as water_areas",
"extent": "-20037508,-20037508,20037508,20037508",
"key_field": "",
"geometry_field": "way",
Expand Down
15 changes: 15 additions & 0 deletions shapefiles.mss
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,27 @@
}
}

#world-south {
[zoom < 2] {
polygon-fill: @land-color;
}
[zoom >= 2][zoom < 10] {
polygon-pattern-file: url('symbols/glacier.png');
}
}

#coast-poly {
[zoom >= 10] {
polygon-fill: @land-color;
}
}

#coast-poly-south {
[zoom >= 10] {
polygon-pattern-file: url('symbols/glacier2.png');
}
}

#builtup {
[zoom >= 8][zoom < 10] {
polygon-fill: #ddd;
Expand Down
5 changes: 4 additions & 1 deletion water.mss
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
@water-text: #6699cc;

#water-areas {
[natural = 'glacier']::natural {
[natural = 'glacier'] {
[way_area >= 15000000000000][zoom >= 2][zoom < 6] {
polygon-pattern-file: url('symbols/glacier.png');
}
[zoom >= 6] {
line-dasharray: 4,2;
line-width: 1.5;
Expand Down