OsmAnd OBF — Binary Format for Offline Navigation on Android and iOS

2026-05-0911 min read
OsmAndOBFoffline navigationmobileOpenStreetMaprouting

OsmAnd OBF (OsmAnd Binary File) is the proprietary binary format for the OsmAnd Maps & Navigation app, released by Viktor Shcherbakov and the OsmAnd BV team (Netherlands) in 2010 for Android. Over 16 years OsmAnd has grown into the largest open-source offline navigation app in the world with 40+ million installs: it needs no internet to do turn-by-turn routing, POI search, address geocoding, and multi-style map rendering. All that functionality is packed into per-country and per-region OBF files that the user downloads once and stores on the device. Inside OBF sit five indexed sections built on Google Protocol Buffers: Map Index (multi-zoom rendering data), Routing Index (navigation graph), POI Index (points of interest with categories), Address Index (geocoding), and Transport Index (public transit). Each section has its own R-tree or prefix index for O(log n) lookups on a RAM-constrained device. On osm2cdr.ru osmand_obf_exporter.py wraps the Java OsmAndMapCreator utility from the OsmAnd team, converting OSM bbox data into a ready-to-use .obf file you can copy to /Android/data/net.osmand/files/ and immediately open in OsmAnd like any built-in map. The exporter status is Beta because of its heavy Java dependency and large heap requirements in the worker container.

Map generation of London city center

History: OsmAnd 2010 → OBF Creator → Pro subscription

OsmAnd started in 2010 as a student project by Viktor Shcherbakov, a Russian developer who relocated to the Netherlands. The idea was simple: build an OSM app for Android that works offline — no dependence on Google Play Services, no roaming bills, no cellular coverage required in the mountains or on a plane. The first public release shipped in Google Play in August 2010, and it became clear almost immediately that an offline map app needs its own binary format: neither SQLite-based MBTiles, nor OSM XML, nor PBF (Protocol Buffer Format from Mapnik) fit — a format with multi-zoom rendering and a routing graph in a single container was required.

OBF (OsmAnd Binary File) was born together with the app. The OsmAnd team took Google Protocol Buffers as the foundation (the same protocol as OSM PBF but with a completely different schema) and layered five indexed sections for their own needs: Map (rendering), Routing (navigation graph), POI, Address, Transport. The OBF spec never received ISO or OGC status, but it stayed fully documented at osmand.net/docs/technical and open in OsmAnd's source code (GitHub osmandapp/Osmand).

In 2012 Hardy Mahler and Eugene Zubricki joined OsmAnd and the project shifted to community-driven open-source development. By 2014 OsmAnd+ (paid version on Google Play) and OsmAnd Live (daily map update subscription) appeared. Free OsmAnd allowed downloading a limited number of regions; OsmAnd+ removed that cap. In 2018 OsmAnd Maps for iOS landed on the App Store — same OBF format, Objective-C/Swift codebase.

In 2021 OsmAnd launched the OsmAnd Pro subscription: $2.99/month or $30/year, including full POI base (Wikipedia + Wikivoyage), 3D terrain, contour lines, nautical depth contours, regular map updates. OsmAnd Pro is the project's main commercial revenue, while the base app remains free and open-source (GPLv3). As of 2026 OsmAnd has 40+ million Android installs and 5+ million iOS installs, making it the largest OSM-based navigator worldwide and outpacing Maps.me and Organic Maps in combined audience.

Inside OBF: multi-zoom, route graph, POI index, address index

OBF is a multi-section binary file built on Google Protocol Buffers with a .proto schema describing 5 different data kinds. The file starts with a short header (32 bytes: format version + creation date + checksum) followed by N sections in the order the generator added them:

Map Index — rendering data for displaying the map at multiple zooms. Stores roads, buildings, water, green areas, boundaries. Geometries are packed in a Z-order curve (Morton code) for spatial locality and split into tiles at zoom levels 5/9/13/17 (4 detail levels). Each zoom level has its own R-tree index for fast spatial lookup. Feature properties (OSM tags) are encoded through a string table plus indices for compactness.

Routing Index — graph for turn-by-turn navigation. Stores roads as nodes and edges with attributes: highway tag, allowed speed, turn restrictions, oneway, barriers. The graph is sliced into supersections (medium tiles) with overlap between neighbors for seamless routing across tile borders. On the device, OsmAnd uses the A* algorithm with heuristics to compute a route without fully loading the graph into RAM.

POI Index — points of interest. Stores ~30 categories: restaurants, banks, pharmacies, gas stations, museums, hotels, and so on. Search uses two indices: spatial (R-tree for "find nearest restaurants") and text (prefix-trie for "find by name"). With OsmAnd Pro the POI section adds Wikipedia content (article + photo), which doubles the OBF size but delivers rich landmark info offline.

Address Index — geocoding (address → coordinates and reverse). Hierarchy: country → region → city → street → house. Search runs through prefix indices (trie structure) with typo tolerance (fuzzy match via edit distance). For big countries (Russia, USA) the Address Index is the bulkiest part of the OBF.

Transport Index — public transit: buses, trams, metro, trains. Stores routes as stop sequences with schedules (when available in OSM). OsmAnd can plan multimodal "home → metro → walk" routes.

All five sections are indexed through an offset table at the file start, which lets OsmAnd on-device read only the needed fragment via mmap without loading the whole OBF into RAM. A typical country OBF is 200–800 MB; OsmAnd Pro versions with Wikipedia content reach 1–3 GB. Historically OBF had a practical ~2 GB limit due to FAT32 file system limits on older Android devices, so big countries are split into regions (Russia → Russia_Northwest_FederalDistrict, Russia_Central, etc.).

Map generation of Nizhny Novgorod city center

Use cases

Tourist abroad without internet. Downloads a country OBF on hotel Wi-Fi, turns off mobile data, walks Paris/Tokyo/Sydney with full navigation and POI search. No roaming bills. OsmAnd's core audience since 2010.

Mountain cyclist. OsmAnd Pro with contour lines and hillshading gives a superior off-road cycling map: dirt roads, trails, brody footpaths, water sources. Routing accounts for slopes and prefers bike paths.

Off-road and 4x4 expeditions. OsmAnd shows dirt roads, river crossings, abandoned tracks (highway=track / unclassified) — things missing from Google Maps. The 4x4 community in the US/Canada/Russia actively uses OsmAnd for overlanding.

Marine navigation (with OsmAnd Pro). Nautical depth contours, lighthouses, navigation marks. Not a replacement for professional ECDIS, but enough for kayaking and coastal sailing.

Hiking. OSM contains a huge body of hiking routes (route=hiking) with waymarking. OsmAnd shows them as overlay, navigates along them with off-route warnings.

International drivers / long-haul truckers. A single Western Europe OBF (~3 GB for OsmAnd Pro) gives navigation across 20+ countries offline. An alternative to expensive dedicated Garmin/TomTom units.

Pros / Cons

Strengths. Open-source app (GPLv3) — the format is fully documented and isn't tied to a single company's commercial interests. Full on-device routing — A* runs without a server, on planes, in mountains. Multi-zoom rendering — several detail levels in one file, no separate per-zoom tile downloads. Pluggable map styles — OsmAnd ships 8+ built-in styles (default, nautical, ski, OSMC) and supports user-defined styles. Offline Wikipedia content (with Pro) — invaluable for trips through obscure regions. Regular updates — monthly base maps, daily for OsmAnd Pro.

Weaknesses. Proprietary format — outside OsmAnd, no app opens OBF (no converters back to standards). Heavy generation — OsmAndMapCreator is a Java app with a 4–16 GB heap, awkward for serverless workflows. 2 GB practical limit — big countries are split into regions, complicating cross-border routing. GPLv3 dependency — commercial embedding of OsmAnd in closed-source apps is legally tricky. Pro paywall — full POI and Wikipedia content require the paid subscription.

OBF vs Garmin IMG vs Maps.me MWM. Garmin IMG is the standard for Garmin hardware navigators (from eTrex to nüvi), created via mkgmap. OBF is the standard for smartphones via OsmAnd. MWM is the format for Maps.me / Organic Maps, technically similar to OBF (binary, multi-section, protobuf-based) but simpler: fewer features, faster rendering, better for in-city walking navigation. For Android/iOS tourists — OBF (rich functionality + routing). For dedicated GPS in cars / on bikes — Garmin IMG. For minimal in-city walking — MWM (Organic Maps).

Workflow in OSM2CDR

Our osmand_obf_exporter.py is a Python wrapper around the Java OsmAndMapCreator utility (source code in the osmandapp/OsmAnd-resources GitHub repo). Pipeline:

Step 1: PostGIS → OSM XML. The worker queries PostGIS by user bbox and writes a temporary OSM XML file (nodes, ways, relations in the standard OSM schema). This is the intermediate format OsmAndMapCreator expects as input.

Step 2: OsmAndMapCreator → OBF. A Java command like java -Xmx8G -jar OsmAndMapCreator.jar --indexes=all input.osm output.obf builds all 5 sections (Map, Routing, POI, Address, Transport). The --indexes flag selects which sections to include; for a lightweight export you can restrict to --indexes=map,poi (rendering and POI only, no routing).

Step 3: User installation. The finished .obf is downloaded through /api/render and the user copies it to /Android/data/net.osmand/files/ (or /storage/emulated/0/Android/data/net.osmand/files/ on newer Android). OsmAnd scans that directory on launch and picks up the new file automatically. Same flow on iOS — via iTunes File Sharing or the Files app.

Java dependency / Beta status. The OBF exporter on osm2cdr.ru sits in Beta for two reasons. First, OsmAndMapCreator needs Java 11+ and a large heap (8–16 GB for big-city or small-country regions), which bloats the worker container memory footprint. Second, OBF generation is slow: a typical 100 km² city takes 30–90 seconds, an oblast-sized Russian region runs 5–15 minutes. For bigger bbox (>500 km²) we recommend splitting the export into regions and assembling the map from multiple OBFs in OsmAnd.

Community Python alternatives to the Java pipeline exist (obf-tools from enthusiasts), but they're incomplete — only Map Index support, no Routing/POI/Address. So OsmAndMapCreator remains the only production-ready path for a full OBF.

Map generation of Vienna city center

FAQ

Can I open OBF in QGIS or another GIS? No. OBF is a proprietary format specifically for OsmAnd. QGIS, ArcGIS, MapInfo don't open it and no open-source OBF → GeoPackage / Shapefile converters exist. If you need OSM data for GIS analysis, use GeoPackage or Shapefile export instead.

Is OBF compatible with Maps.me / Organic Maps? No. Maps.me and Organic Maps use their own MWM format, technically similar to OBF (also protobuf-based, multi-section) but with a different schema. There's no direct compatibility between OBF and MWM — different formats for different apps.

How do I add custom POI or edit the map in OsmAnd? OsmAnd lets you add favorites and POIs manually through the app UI — they're stored in a separate SQLite database, not in the OBF itself (which is read-only). To edit the underlying OSM data, the path is: edit in iD/JOSM → upload to OpenStreetMap → wait for the next OBF update.

How large is a country OBF? Depends on country and section set. Russia (no Pro extras) — ~600 MB; Russia + Wikipedia + 3D terrain (OsmAnd Pro) — ~2.5 GB. Small countries (Belarus, Georgia) — 100–200 MB. Individual cities (Moscow, St. Petersburg) — 50–150 MB. On osm2cdr.ru we export user bbox areas, typically 10–50 MB for a city district.

Can I use OBF in a commercial project? The OBF file itself is a derivative work of OSM data — ODbL license applies. The OsmAnd app is GPLv3, which complicates embedding in commercial closed-source apps. For commercial mobile navigation consider MapBox SDK or commercial OsmAnd licensing via OsmAnd BV directly.

Why is your exporter Beta and not Stable? Java tooling dependency — OsmAndMapCreator doesn't fit organically into our Python/QGIS pipeline and requires a separate JVM in the worker container with a large heap. For big bbox the export can take 5–15 minutes vs 30 seconds for other formats. We're working on pipeline optimization and a native Python port of critical OsmAndMapCreator parts; for now use the OBF export with these trade-offs in mind.

Closing

OsmAnd OBF is the only open-source offline navigation format with truly complete functionality: on-device turn-by-turn routing, POI search, address geocoding, multi-zoom rendering, public transit — all in a single binary file. Sixteen years of OsmAnd team development made the format the standard for open-source mobile navigation, a competitor to Google Maps / Maps.me / Locus in the niche of users who value offline operation and privacy. On osm2cdr.ru the OBF export ships in Beta — try it on a specific bbox via /formats/osmand-obf/, download the .obf, copy to /Android/data/net.osmand/files/, and within seconds the map appears in OsmAnd with full functionality.

Sources

← All articles