Skip to content

Commit

Permalink
separate land polygons for antarctica
Browse files Browse the repository at this point in the history
  • Loading branch information
imagico committed Jun 18, 2014
1 parent 9efd70d commit 220d840
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 5 deletions.
13 changes: 11 additions & 2 deletions get-shapefiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ curl -z "data/simplified-land-polygons-complete-3857.zip" -L -o "data/simplified
echo "simplified-land-polygons-complete-3857..."
unzip $UNZIP_OPTS data/simplified-land-polygons-complete-3857.zip simplified-land-polygons-complete-3857/simplified_land_polygons.{shp,shx,prj,dbf,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 All @@ -42,6 +46,8 @@ curl -z "data/land-polygons-split-3857.zip" -L -o "data/land-polygons-split-3857
echo "expanding land-polygons-split-3857..."
unzip $UNZIP_OPTS data/land-polygons-split-3857.zip land-polygons-split-3857/land_polygons.{shp,shx,prj,dbf,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 @@ -55,8 +61,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
44 changes: 41 additions & 3 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.051,
-60,
179.99999692067183,
83.66933299999998
],
"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.051,
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,
83.66933299999998
],
"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
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 = 0] {
polygon-fill: @land-color;
}
[zoom >= 1][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

0 comments on commit 220d840

Please sign in to comment.