Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Xevib committed Jun 9, 2015
1 parent 5539f69 commit 3ffc2d8
Show file tree
Hide file tree
Showing 4 changed files with 26,987 additions and 176 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:14.04
#FROM stencila/ubuntu-14.04
MAINTAINER Helmi <[email protected]>
MAINTAINER Xavier Barnada <[email protected]>
RUN apt-get -y update
RUN apt-get -y install python-dev npm
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty main universe" > /etc/apt/sources.list
Expand All @@ -23,7 +23,7 @@ RUN echo "deb http://ppa.launchpad.net/mapnik/nightly-2.3/ubuntu trusty main">>/
RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4F7B93595D50B6BA
RUN apt-get update

RUN apt-get -y install mapnik-input-plugin-gdal mapnik-input-plugin-ogr mapnik-input-plugin-postgis mapnik-input-plugin-sqlite mapnik-input-plugin-osm python-pip ttf-dejavu ttf-dejavu-core ttf-dejavu-extra ttf-unifont osm2pgsql curl bzip2
RUN apt-get -y install mapnik-input-plugin-gdal mapnik-input-plugin-ogr mapnik-input-plugin-postgis mapnik-input-plugin-sqlite mapnik-input-plugin-osm python-pip ttf-dejavu ttf-dejavu-core ttf-dejavu-extra ttf-unifont osm2pgsql curl bzip2 unzip mapnik-utils gdal-bin

COPY default.style /usr/share/osm2pgsql/default.style

Expand Down
54 changes: 27 additions & 27 deletions style/get-shapefiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,84 +5,84 @@ UNZIP_OPTS=-qqun

# create and populate data dir

mkdir -p data/
mkdir -p data/world_boundaries
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 /style/data/
mkdir -p /style/data/world_boundaries
mkdir -p /style/data/simplified-land-polygons-complete-3857
mkdir -p /style/data/ne_110m_admin_0_boundary_lines_land
mkdir -p /style/data/ne_10m_populated_places
mkdir -p /style/data/land-polygons-split-3857

# world_boundaries
echo "dowloading world_boundaries..."
curl -z "data/world_boundaries-spherical.tgz" -L -o "data/world_boundaries-spherical.tgz" "http://planet.openstreetmap.org/historical-shapefiles/world_boundaries-spherical.tgz"
curl -z "/style/data/world_boundaries-spherical.tgz" -L -o "/style/data/world_boundaries-spherical.tgz" "http://planet.openstreetmap.org/historical-shapefiles/world_boundaries-spherical.tgz"
echo "expanding world_boundaries..."
tar -xzf data/world_boundaries-spherical.tgz -C data/
tar -xzf /style/data/world_boundaries-spherical.tgz -C /style/data/

# simplified-land-polygons-complete-3857
echo "downloading simplified-land-polygons-complete-3857..."
curl -z "data/simplified-land-polygons-complete-3857.zip" -L -o "data/simplified-land-polygons-complete-3857.zip" "http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip"
curl -z "/style/data/simplified-land-polygons-complete-3857.zip" -L -o "/style/data/simplified-land-polygons-complete-3857.zip" "http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip"
echo "simplified-land-polygons-complete-3857..."
unzip $UNZIP_OPTS data/simplified-land-polygons-complete-3857.zip \
unzip $UNZIP_OPTS /style/data/simplified-land-polygons-complete-3857.zip \
simplified-land-polygons-complete-3857/simplified_land_polygons.shp \
simplified-land-polygons-complete-3857/simplified_land_polygons.shx \
simplified-land-polygons-complete-3857/simplified_land_polygons.prj \
simplified-land-polygons-complete-3857/simplified_land_polygons.dbf \
simplified-land-polygons-complete-3857/simplified_land_polygons.cpg \
-d data/
-d /style/data/

# 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
curl -z "/style/data/ne_110m_admin_0_boundary_lines_land.zip" -L -o "/style/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"
echo "expanding ne_110m_admin_0_boundary_lines_land..."
unzip $UNZIP_OPTS data/ne_110m_admin_0_boundary_lines_land.zip \
unzip $UNZIP_OPTS /style/data/ne_110m_admin_0_boundary_lines_land.zip \
ne_110m_admin_0_boundary_lines_land.shp \
ne_110m_admin_0_boundary_lines_land.shx \
ne_110m_admin_0_boundary_lines_land.prj \
ne_110m_admin_0_boundary_lines_land.dbf \
-d data/ne_110m_admin_0_boundary_lines_land/
-d /style/data/ne_110m_admin_0_boundary_lines_land/

# ne_10m_populated_places
echo "dowloading ne_10m_populated_places..."
curl -z data/ne_10m_populated_places.zip -L -o data/ne_10m_populated_places.zip http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip
curl -z "/style/data/ne_10m_populated_places.zip" -L -o "/style/data/ne_10m_populated_places.zip" "http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip"
echo "expanding ne_10m_populated_places..."
unzip $UNZIP_OPTS data/ne_10m_populated_places.zip \
unzip $UNZIP_OPTS /style/data/ne_10m_populated_places.zip \
ne_10m_populated_places.shp \
ne_10m_populated_places.shx \
ne_10m_populated_places.prj \
ne_10m_populated_places.dbf \
ne_10m_populated_places.cpg \
-d data/ne_10m_populated_places/
-d /style/data/ne_10m_populated_places/

# land-polygons-split-3857
echo "dowloading land-polygons-split-3857..."
curl -z "data/land-polygons-split-3857.zip" -L -o "data/land-polygons-split-3857.zip" "http://data.openstreetmapdata.com/land-polygons-split-3857.zip"
curl -z "/style/data/land-polygons-split-3857.zip" -L -o "/style/data/land-polygons-split-3857.zip" "http://data.openstreetmapdata.com/land-polygons-split-3857.zip"
echo "expanding land-polygons-split-3857..."
unzip $UNZIP_OPTS data/land-polygons-split-3857.zip \
unzip $UNZIP_OPTS /style/data/land-polygons-split-3857.zip \
land-polygons-split-3857/land_polygons.shp \
land-polygons-split-3857/land_polygons.shx \
land-polygons-split-3857/land_polygons.prj \
land-polygons-split-3857/land_polygons.dbf \
land-polygons-split-3857/land_polygons.cpg \
-d data/
-d /style/data/


#process populated places
echo "processing ne_10m_populated_places..."
rm -f data/ne_10m_populated_places/ne_10m_populated_places_fixed.*
ogr2ogr --config SHAPE_ENCODING UTF8 data/ne_10m_populated_places/ne_10m_populated_places_fixed.shp data/ne_10m_populated_places/ne_10m_populated_places.shp
rm -f /style/data/ne_10m_populated_places/ne_10m_populated_places_fixed.*
ogr2ogr --config SHAPE_ENCODING UTF8 /style/data/ne_10m_populated_places/ne_10m_populated_places_fixed.shp /style/data/ne_10m_populated_places/ne_10m_populated_places.shp

#index
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/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
/style/data/simplified-land-polygons-complete-3857/simplified_land_polygons.shp \
/style/data/land-polygons-split-3857/land_polygons.shp \
/style/data/ne_10m_populated_places/ne_10m_populated_places_fixed.shp \
/style/data/ne_110m_admin_0_boundary_lines_land/ne_110m_admin_0_boundary_lines_land.shp


#clean up
echo "cleaning up..."
rm data/ne_10m_populated_places/ne_10m_populated_places.*
rm /style/data/ne_10m_populated_places/ne_10m_populated_places.*

echo "...done!"
Loading

0 comments on commit 3ffc2d8

Please sign in to comment.