wiki:Opendistro

Version 8 (modified by krit, 3 years ago) (diff)

--

Opendistro

Create openstreetmap to own host for use need to follow here

  1. create volume
    docker volume create openstreetmap-data
    
  2. mkdir folder in working directory and download thailand-latest.osm.pbf from here
    mkdir openstreetmap-data 
    
  3. create database map
    docker run \
        -v /home/kt/Documents/Dockers/OpenStreetMap/thailand-latest.osm.pbf:/data.osm.pbf \
        -v /home/kt/Documents/Dockers/OpenStreetMap/openstreetmap-data:/var/lib/postgresql/12/main \
        overv/openstreetmap-tile-server \
        import
    
  4. after done, we can remove docker that create DB for map. Then, we start map service. We can increase thread (use 4 threads by default) and 800 MB RAM cache by default, but we can increase 4096 MB for cache memory
    docker run \
        -p 8080:80 \
        -e THREADS=24 \
        -v openstreetmap-data:/var/lib/postgresql/12/main \
        -d overv/openstreetmap-tile-server \
        run
    
    #docker run \
    #    -p 8080:80 \
    #    -e "OSM2PGSQL_EXTRA_ARGS=-C 4096" \
    #    -v openstreetmap-data:/var/lib/postgresql/12/main \
    #    -d overv/openstreetmap-tile-server \
    #    run
    
    

Start Open Distro

Download the folder and unzip from here

Run docker-compose up from attach docker-compose.yml

docker-compose up -d

To increase the map zoom level change kibana.yml file to maxZoom: 20 like following

map.tilemap.url: "http://161.246.35.199:8080/tile/{z}/{x}/{y}.png"
map.tilemap.options.maxZoom: 20
map.tilemap.options.attribution: 'Map tiles by Stamen Design 1, under CC BY 3.0. Data by OpenStreetMap, under ODbL(http://www.openstreetmap.org/copyright ).'

Attachments (2)

Download all attachments as: .zip