ഇതൊഴിവാക്കി പ്രധാന ഉള്ളടക്കത്തിലേക്ക് പോവുക

How to deploy open street map as offline ( In your server )?

 

Maps have a decent role in visualizing movement, activities, culture etc.

But using a map for your application is always lead to taking subscriptions or spending huge money altogether. Open street map offline future is very hand in such situations. Let's see how to deploy an open street map API in your system using docker.



Pre-requisites: a piece of basic knowledge in docker 

Let's deploy one.


First, we have to download the portion of the map we want to deploy ( you can download the entire map if you wish but here I am using a chunk from it.)

First, we need to create a folder in our system so that we can save the map (represented as a number of tiles) into that.


Step 1:

// Creating a volume and naming it "openstreetmap-data"

docker volume create openstreetmap-data


Step 2:

//Next download the map from geofabrik.de, I downloaded a map of India.

//for that download map data such as india-latest.osm.pbf and extract from geofabrik.de

// let's install it and render that downloaded tiles into the API


docker run \

    -v /home/deployer/india-latest.osm.pbf:/data.osm.pbf \

    -v openstreetmap-data:/var/lib/postgresql/12/main \

    overv/openstreetmap-tile-server \

    import



Step 3:

//, let's preserve the rendered data so that next time you can get it from the preserved rather than // rendering it again. Create a volume for rendered tiles and load from that later 

docker volume create openstreetmap-rendered-tiles


Step 4: 

Run Open Street Map api

docker run \

    -p 8081:80 \

    -e ALLOW_CORS=enabled \

    -v openstreetmap-data:/var/lib/postgresql/12/main \

    -v openstreetmap-rendered-tiles:/var/lib/mod_tile \

    -d overv/openstreetmap-tile-server \

    run


Additionals

--------------


 give option "-e UPDATES=enabled \"  to enable automatic update 

 give option "-e THREADS=24 \"  to use 24 threads, default is 4

 give option "-e "OSM2PGSQL_EXTRA_ARGS=-C 4096" \" to increase RAM cache to 4 GB,default is 800 MB

 give option "-e ALLOW_CORS=enabled \" to retrieve tiles from other domain

അഭിപ്രായങ്ങള്‍

ഈ ബ്ലോഗിൽ നിന്നുള്ള ജനപ്രിയ പോസ്റ്റുകള്‍‌

തിരിച്ചറിവ്

{ഞാനും നീയും എന്ന എന്റെ സുഹൃത്ത്‌ പി.വി.ജോണിന്റെ പോസ്റ്റിനു കമന്റ്‌ ആയി എഴുതിയത് } ഞാനും നീയും ഒരൊറ്റ മനസ്സായിരുന്നപ്പോഴും ഒരു ശരീരമായിരുന്നപ്പോഴും ഓര്‍ത്തിരുന്നില്ല  രണ്ടു വ്യത്യസ്ത വാക്കുകള്‍ ആണെന്ന്...  

നുറുങ്ങുകള്‍ തീര്‍ക്കുന്നു നുറുങ്ങുവെട്ടം....

നുറുങ്ങുകള്‍ തീര്‍ക്കുന്നു നുറുങ്ങുവെട്ടം.... ( ഈ പോസ്റ്റ്‌ എഴുതാന്‍ പ്രചോദനമായ  ഹൈക്കു പോയംസ്  https://www.facebook.com/groups/Haikupoems/   എന്ന ഗ്രൂപ്പിനും  എന്നെ എന്നും പ്രോല്‍സാഹിപ്പിച്ചു കൊണ്ടിരിക്കുന്ന  https://www.facebook.com/groups/malayalamblogers/    മലയാളം ബ്ലോഗേഴ്സ് ഗ്രൂപ്പിനും    ഒത്തിരി നന്ദി..  ഒപ്പം വേണുഗോപാല്‍ ഏട്ടന്‍, തമ്പാന്‍ നായര്‍..,  സോണി ചേച്ചി,ഗിരിജ ചേച്ചി, ശിവപ്രസാദ്‌ പാലോട്‌, അപ്പു എം ശിവന്‍,സുമയ്യ തന്നാരി,  പ്രിയ കളരിക്കല്‍, പ്രിയക്കുട്ടി  അനീഷ്‌ കെ.വി,ഷാജു ഏട്ടന്‍  എന്നിവര്‍ക്കും നിങ്ങള്‍ക്കും   ഒത്തിരിയൊത്തിരി നന്ദി )  വായനക്കാരെ നിങ്ങള് സഹിച്ചോളീന്‍.....,..............       ലൈക്കുന്നു ചിലര്‍              പോക്കുന്നു ചിലര്‍       ചിരിക്കുന്നു ചിലര്‍          മനസ്സുകള്‍ തമ്മില്‍       കുറയുന്നു വിള്ളല്‍       കൊഴിയുന്ന മോഹം       കരിയുന്ന സ്വപ്നം          ഞാന്‍ വെറും കരിയില       ആശകള്‍ വേണ്ട       കാശുകള്‍ മതി       വാശിയില്‍ ഓടി       അന്ത്യ നേരം       മൂശയില്‍ കോറി       നിരാശകള

അതിരപ്പിള്ളിയും കടന്നൊരു വെള്ള-ച്ചാട്ടം - ഭാഗം1

"എബ്ടെക്കാ കാലത്തെന്നെ ഇത്രേ നേരത്തെ!" "ഏയ്‌..ഒന്നൂല്യച്ചാ ഈ അതിരപ്പിള്ളി വരെ.." "ആരാടാ കൂടെ " (അലംബ് ടീംസ് ആണോന്ന്.. ) "കോളേജിലെ കുട്ട്യോളാ അച്ഛാ.. വീക്കെന്‍ഡല്ലേ.. കോഴിക്കോട് പാര്‍ട്ടീസാ .. അവരീന്തിരപ്പിള്ളി കണ്ടട്ടില്ലേയ്.പിന്നെ ആ പുതുക്കാട് ജോസെനും ഉണ്ട്.    ഇന്നാളു കണ്ടില്ലെച്ചന്‍, അവന്‍" അവന്റെ പേര് പറഞ്ഞോണ്ട് ആണോന്നറിയില്ല..പക്ഷെ പിന്നെ കേട്ടത് " ഒരച്ഛന്റെ രോദനം " ആയിരുന്നു . "ഇന്നാളു പോയില്ലേ നീയ്‌.പിന്നെ എന്തിനാ വീണ്ടും.  ങ്ഹാ.. പിള്ളേര് സെറ്റാവുമ്പോ, ആവേശം കൂടുമ്പോ ഒരു വെള്ള ചാട്ടം ഉണ്ടാവും. അച്ഛനെ കുട്ടിയ്ക്ക് അങ്ങനെ ഒരു വെള്ളച്ചാട്ടം വേണ്ടാട്ടാ.." ആ സ്നേഹപ്രകടനത്തില്‍ ഞാന്‍ അലിഞ്ഞു പോവുമെന്ന് അച്ഛന്‍ വിചാരിച്ചു കാണും.   എന്നാലും പ്രലോഭനങ്ങളില്‍ വീഴാതിരിക്കുക എന്നത് യുവാക്കളുടെ കര്‍ത്തവ്യം ആണല്ലോ. "ആ പിന്നെ..അച്ഛാ ആ പഴയ ക്യാമറ.." "എടുത്തോ..പിന്നെ ആര്‍ക്കും കൊടുക്കരുത്‌ ..പിന്നെ ഫോടോന്റെ ഫങ്ങി നോക്കലോക്കെ അവസാനം മതി.ബാറ്ററി എങ്ങാനും തീര്‍