simplified osm import to work without docker
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
import-wikidata
imposm3
openmaptiles-tools
osmosis
postgis-vt-util
tilelive
.gitattributes
README
create_db.sh
export_mbtiles.sh
load_all.sh
load_lakelines.sh
load_mass.sh
load_naturalearth.sh
load_osmborder.sh
load_planet.sh
load_water.sh
load_wikidata.sh
update_planet.sh

README

Sources
https://github.com/openmaptiles/openmaptiles
https://github.com/openmaptiles/openmaptiles-tools
https://github.com/omniscale/imposm3
https://github.com/giggls/osml10n-python

References
https://imposm.org/docs/imposm3/latest/tutorial.html#preparation
https://ninefinity.org/post/importing-openstreetmap-planet-osm-with-imposm3-and-osmosis/
https://github.com/giggls/osml10n-python/blob/master/INSTALL.md

This is mostly a de-dockerized version of OpenMapTiles v3.9 (https://github.com/openmaptiles/openmaptiles). It very closly keeps to the way the openmaptiles quickstart works, minus all the docker obfuscation

# Install/run on debian

1.) Install posgresql 10 ( https://www.postgresql.org/download/linux/debian/ )

Create the file /etc/apt/sources.list.d/pgdg.list, and add a line for the repository:
     deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main
	 
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
apt-get install postgresql-10

2.) Install PostGIS for postgres 10 (https://postgis.net/install/)

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt xenial-pgdg main" >> /etc/apt/sources.list'
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
sudo apt install postgresql-10-postgis-2.4 
sudo apt install postgresql-10-postgis-scripts
sudo apt install postgis

3.) Clone this repository and set the sh files executable
sudo apt install git
git clone https://github.com/acalcutt/wdb-map-gen.git
cd wdb-map-gen
chmod +x *.sh

4.) Recompile imposm3. the binary will be created in the imposm3/bin folder

sudo apt-get install libgeos-dev libleveldb-dev build-essential
cd [wdb-map-gen DIR]/imposm3
export GOPATH=`pwd`
go get github.com/omniscale/imposm3
go install github.com/omniscale/imposm3/cmd/imposm

5.) Update [wdb-map-gen DIR]\config\env.config. at minimum, set the POSTGRES_PASS

6.) Import the planet pbf into postgress (note, this uses at least 500GB, make sure your postgress datastore has the space)

cd [wdb-map-gen DIR]
./load_planet.sh

7.) Export to mbtiles (this step is still in process of being made, and may not yet be ready)

#openmaptiles depends
sudo apt-get install python-pip
pip install docopt
pip install pyyaml
pip install openmaptiles-tools

#osml10n depends
sudo apt-get install python3-pip
pip3 install pykakasi
pip3 install pyicu
pip3 install python-Levenshtein
pip3 install pythainlp
pip3 install git+https://github.com/giggls/osml10n.git

#tile-copy depends
npm install --unsafe-perm -g  tl mapnik@^3.7.0 @mapbox/mbtiles @mapbox/tilelive @mapbox/tilelive-vector @mapbox/tilelive-bridge @mapbox/tilelive-mapnik
npm install git+https://github.com/acalcutt/tilelive-tmsource.git

cd [wdb-map-gen DIR]
./export_mbtiles.sh


# Install/run on Windows debian WSL

1.) Install BigSQL postgres 10

2.) Install the latest PostGIS windows binary into postgress from  ( https://winnie.postgis.net/download/windows/pg10/buildbot/ )

3.) Follow step 3-5 for debian above inside the debian WSL environment. Point the env.config to your windows postgres server.