I have a remote server tasked with regularly generating .osm files from Wikivoyage listings.

I would like that server to also convert from .osm to .obf
While this conversion is easy with the GUI of OsmAndMapCreator (screenshot below), I am not sure how to proceed by command-line (bash).

OsmAnd Map Creator - Create .obf from osm file...

asked 18 Dec '13, 09:12

Nicolas%20Raoul's gravatar image

Nicolas Raoul
605162331
accept rate: 20%


1) Create 2 folders, for instance /home/nico/osm2obf/input and /home/nico/osm2obf/output

2) Put your OSM file(s) in /home/nico/osm2obf/input.

3) Create this file in the folder where OsmAndMapCreator is installed:

<?xml version="1.0" encoding="utf-8"?>
<batch_process>
    <process_attributes
        mapZooms=""
        renderingTypesFile=""
        zoomWaySmoothness="" 
        osmDbDialect="sqlite"
        mapDbDialect="sqlite"/>
    <process
        directory_for_osm_files="/home/nico/osm2obf/input"
        directory_for_index_files="/home/nico/osm2obf/output"
        directory_for_generation="/home/nico/osm2obf/output"
        skipExistingIndexesAt=""
        indexPOI="true"
        indexRouting="false"
        indexMap="false"
        indexTransport="false"
        indexAddress="false">
    </process>
</batch_process>

4) Run this command:

java -Djava.util.logging.config.file=logging.properties -Xms256M -Xmx2560M -cp "./OsmAndMapCreator.jar:./lib/OsmAnd-core.jar:./lib/*.jar" net.osmand.data.index.IndexBatchCreator osm2obf.xml
permanent link

answered 18 Dec '13, 09:36

Nicolas%20Raoul's gravatar image

Nicolas Raoul
605162331
accept rate: 20%

edited 18 Dec '13, 09:38

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×76
×2

question asked: 18 Dec '13, 09:12

question was seen: 5,201 times

last updated: 18 Dec '13, 09:38

powered by OSQA