Download OsmAnd Map Creator

0 views
Skip to first unread message

Phyllis Sterlin

unread,
May 20, 2024, 5:29:54 PM5/20/24
to memlalecpa

OsmAndMapCreator is a program that accompanies OsmAnd for making offline-usable data files. The most important feature is the creation of OBF files out of OSM data. Other functions allow the user to create POI, address, transit, and routing indexes from OSM files (.osm, .bz2, .pbf). OBF format is the output format and used by OsmAnd for offline rendering, routing, and search on a mobile device.

OsmAndMapCreator does not need to be installed at your computer, just Java (Windows - Java Se 19.0.02 Tested working) or OpenJDK (Linux, OSX) has to be installed. You do not need administrative/root access if Java is installed already. If you do not know if Java is installed, just open a command line window and run the command java. If the output describes some arguments for starting Java and does not show a simple "file not found" (or something like this), Java is installed. More recent versions of OsmAndMapCreator need at least Java 7 to run, otherwise you will get error messages like Unsupported major.minor version 51.0. You can find out the current Java Version by calling java -version.

download OsmAnd Map Creator


Download Zip ✶✶✶ https://t.co/uY0MLPAoJa



OsmAndMapCreator can be downloaded from developers' website. Afterwards extract the download zip-archive at any directory. If you use a Unix-like operating system (OS X, Linux) you have to make the .sh file excutable.

Starting OsmAndMapCreator by a simple double-click is not the right way. You should assign OsmAndMapCreator more RAM than usually Java does in order that OsmAndMapCreator does not abort of lack of memory.

After starting OsmAndMapCreator, click on File, then on Create .obf from OSM file and select the downloaded/clipped PBF file. Wait until OsmAndMapCreator has finished. If you want to create a second OBF file, you should restart OsmAndMapCreator because OsmAndMapCreator does not free the used RAM.

OsmAndMapCreator needs a multiple of the size of the OBF file. You should only make OBF files of large areas if your computer has enough RAM. Please remember that the operating system also needs some RAM. Just have a look at task manager in idle state. Remember that 32-Bit systems can only use 3.3 GB RAM.

Annotation: This table is not finish. You can add your values if you created an OBF file. Please only add your RAM and time consumption if you have not run any other programs with high RAM consumption at the same time. (similar test conditions)

Areas at the size of 300 MB PBF file size and more cannot be converted into OBF format at a stretch without using sqlite_in_memory. You have to split this areas and convert each parts. That's why the OsmAnd developers do not provide whole Germany as OBF for download.

The finished OBF file(s) are stored directly in the "Data storage folder" on the mobile device as specified in the OsmAnd settings, alongside any OBF files you downloaded from the official OsmAnd server. On modern Android versions, this may be something like /data/user/0/net.osmand/no_backup or /storage/emulated/0/Android/data/net.osmand/files. Your files should then appear on the "Local" tab of the "Download maps" page, but you may need to take some extra steps before your data is fully reflected on the map:

Hello experts,
I'm trying to create tiles for use with the Android app OsmAnd to be used as an overlay using the data that openslopemap.org provides in .mbtiles format. I haven't succeeded and I'm not yet sure whether I missed something while generating the tiles in MOBAC or while putting them into osmand. But I suspect the former.
+ I have downloaded as source OSloOVERLAY_HR_AlpsEast_16.mbtiles from
+ I have created an xml file for mobac as they suggested on -mbtiles-in-mobac/, just adjusting the path and file name:

Can anybody tell me what I would have had to do to correctly produce single tiles? I suppose for the amount of data I want to process this will be better usable for my small old phone than a giant sqlite file. Probably I have to replace "localTileSQLite" in the xml file with something else, I just haven't found documentation on this.

Google My Maps does have an option to export as a KML file.If you are using the "classic My Maps", then it is in the left hand sidebar, just underneath the title. There is a link for "KML". If you are using the new "Maps Engine", then look in the top left box, underneath the title there is a folder icon. Click on that folder, then choose "Export to KML".

For using the KML file in OsmAnd, and I'm not sure if it is possible to load it directly. If you want to show lines on the map, then you can convert it to a GPX track, eg using GPSBabel. Then copy it to the osmand/tracks directory, and enable it in OsmAnd by going to menu > Define view > GPX track. See How to view GPX tracks

I've exported my own starred locations using the method noted as 1-a in the blog post using the online tool at . Ashraf noted that it didn't work for him but didn't note why. I (too) needed to do some tweaking to get the conversion tool working. This was likely because I had so many Google Bookmarks that it seemed to choke the tool.

What I did was I edit your exported Google Bookmarks file so that it only contained rows that had a location, the starred locations (and a few other locations that were in the bookmarks, IIRC). The way I did that was by first (after making a copy of the original bookmarks export file) opening the bookmarks file in a text editor, them cut-pasting all the bookmarks to my favorite spreadsheet application, then filtering all rows without the location identifier (.. can't remember what it is but you'll see it when you open it). Then marking those rows and deleting them leaving me with only rows with locations and copy-pasting those rows back to the bookmarks file. After this I was able to get the gexport.somee.com tool to convert my bookmarks into a KML file. And then converted to GPX and imported to OsmAnd.

I also think it unlikely that any other app will have the feature if Google has decided that their official app should not have it. It is their data (not yours) and their API, so they are free to decide whether to give access on Android.

Making Overlay Maps for OsmAnd on LinuxFor many years I've wished I could take a raster map image, like ageology map, an old historical map, or a trail map, and overlay itonto the map shown in OsmAndso I can use it on my phone while walking around.I've tried many times, but there are so many steps and I neverfound a method that worked.Last week, the ever helpful Bart Eisenberg posted to the OsmAnd lista video he'd made:Displayingweb-based maps with MAPC2MAPC: OsmAnd Maps & Navigation.Bart makes great videos ... but in this case, MAPC2MAPCturned out to be a Windows program so it's no help to a Linux user.Darn!But seeing his steps laid out inspired me to try again, and gave mesome useful terms for web searching. And this time I finally succeeded.I was also helped by a post to the OsmAnd list by A Thompson, How to get aerial image into offline use?,though I needed to change a few of the steps.(Note: click on any of the screenshots here to see a larger version.)Georeference the Image Using QGISUpdate in Feb 2024: Several things have changed in QGIS georeferencing(the version I'm using now is 3.28.15-Firenze),so note the updated sections below.

The first step is to georeference the image: turn the plain raster imageinto a GeoTiff that has references showing where on Earth its corners are.It turns out there's an open source program that can do that, QGIS.Although it's poorly documented,it's fairly easy once you figure out the trick.I started with the tutorialGeoreferencing Basics,but it omits one important point, which I finally found in BBRHUFT'sHowto Georeference a map in QGIS. Step 11 is the key: the CoordinateReference System (CRS) must be the same in the georeferencing windowas it is in the main QGIS window. That sounds like a no-brainer, butin practice, the lists of possible CRSes shown in the two windowsdon't overlap, so unless you follow BBRHUFT's advice andtype 3857 into the filter box in both windows, you'll likelyend up with CRSes that don't match. It'll look like it's working, butthe resulting GeoTiff will have coordinates nowhere near where theyshould beInstead, follow BBRHUFT's advice and type 3857 into the filterbox in both windows. The "WGS 84 / Pseudo Mercator" CRS will show upand you can use it in both places. Then the GeoTiff will come out inthe right place.If you're starting from a PDF, you may need to convert it to a raster formatlike PNG or JPG first. GIMP can do that.So, the full QGIS steps are:

  • Start qgis, and bring up Project > Project Properties.
  • Click on CRS, type 3857 in the filter box, and make sure the CRS is set to WGS 84 / Pseudo Mercator.
  • (optional) While you're in Project Properties, you may want to click on General and set Display Coordinates Using: Decimal degrees. By default qgis always uses "meters" (measured from where?) which seems like a bizarre and un-useful default.
  • In Plugins > Manage and Install Plugins..., install two plugins: Quick Map Services and Georeferencer GDAL. Update: both OSM and the Georeferencer are now included by default, so you no longer have to install these plugins.
  • Back in the main QGIS window, go to Web > QuickMapServices (that's one of the plugins you just installed) and pick a background map, probably something from OpenStreetMap. Once you find one that loads, navigate to the area you're interested in. Update: Sometimes, including an OpenStreetMap is as easy as clicking on the OpenStreetMap line in the upper left pane of the QGIS window. Other times there is no such line, and you have to use Web > QuickMapServices. I don't know how QGIS decides.

    (All the OpenStreetMap tile sets print "API Key Required" all over everything. You can get an API key from Thunderforest -- I use one for PyTopo -- but it won't help you here, because nobody seems to know how to get QGIS to use an API key, though I found dozens of threads with people asking. If you find a way, let me know.)
  • Start the georeferencer: Raster > Georeferencer > Georeferencer.... It may prompt you for a CRS; if so, choose WGS 84 / Pseudo Mercator if it's available, and if it's not, type 3857 in the filter box to find it.
  • In the Georeferencer window, File &gt Open Raster... Update: If it isn't showing the files you want to open, you may need to adjust the Files of type menu to make sure it includes your file type. When I ran it just now, I had two JPG files to georeference. The first time, it showed those files automatically. When I went to open the second file, it showed nothing about I had to change Files of type to JPEG JFIF before I could open the file.
  • Select matching points. This part is time consuming but fun.

    Zoom in to your raster map in the Georeferencer window and pick a point that's easy to identify: ideally the intersection of two roads, or a place where a road crosses a river, or similar identifying features. Make sure you can identify the same point in both the Georeferencer window and the main QGIS window (see the yellow arrows in the diagram).
  • Click on the point in the Georeferencer window, then click "from map canvas".
  • In the main QGIS window, click on the corresponding point. You can zoom with the mousewheel and pan by middle mouse dragging. Repeat for a total of four to eight points.

    You'll see yellow boxes pop up in both windows showing the matching points. If you don't, there's something wrong; probably your CRSes don't match.
  • In the Georeferencer window, call up Settings > Transformation Settings. Choose a Transformation type (most people seem to like Thin Plate Spline), a Resampling method (Lanczos is good), a target SRS (make sure it's 3857 WGS 84 / Pseudo Mercator to match the main window). Set Output raster to your desired filename, ending in .tiff. Be sure to check the "Load in QGIS when done" box at the bottom. Click OK.
  • File > Start Georeferencing. It's quite fast, and will create your .tiff file when it's finished, and should load the TIFF as a new layer in the main QGIS window. Check it and make sure it seems to be lined up properly with geographic features. If you need to you can right-click on the layer and adjust its transparency.
  • In the Georeferencer window, File > Save GCP Points as... in case you want to go back and do this again. Now you can close the Georeferencer window.
  • Project > Save to save the QGIS project, so if you want to try again you don't have to repeat all the steps.

    Now you can close qgis. Whew!Convert the GeoTiff to Map TilesThe ultimate goal is to convert to OsmAnd's sqlite format, but there'sno way to get there directly. First you have to convert it to map tilesin a format called mbtiles.QGIS has a plug-in called QTiles but it didn't work for me: it brieflydisplayed a progress bar which then disappeared without creating any files.Fortunately, you can do the conversion much more easily withgdal_translate, which at least on Debian is part ofthe gdal-bin package.gdal_translate filename.tiff filename.mbtilesThat will create tiles for a limited range of zoom levels (maybe onlyone zoom level). gdalinfo will tell you the zoom levels in thefile. If you want to be able to zoom out and still see your overlay,you might want to add wider zoom levels, which you can do like this:gdaladdo -r nearest filename.mbtiles 2 4 8 16Incidentally, gdal can also create a directory of tiles suitable fora web slippy map, though you don't need that for OsmAnd. For that,use gdal2tiles, which on Debian is part ofthe python-gdal package:mkdir tilesgdal2tiles filename.tiff tilesNot only does it create tiles, it also includes multiple HTML filesyou can use to display those tiles using the Leaflet, OpenLayers orGoogle Maps JavaScript libraries. Very cool!Create the OsmAnd sqlite fileTarwirdur has written a nice simple Python script to translate frommbtiles to OsmAnd sqlite:mbtiles2osmand.py.Download it then runmbtiles2osmand.py filename.mbtiles filename.sqlitedbSo easy to use! Most of the other references I saw said to useMobile Atlas Creator (MOBAC)and that looked a lot more complicated.Incidentally, Bart's video says MAPC2MAPC calls the format"Locus/Rmaps/Galileo/OSMAND (sqlite)", which might be useful to knowfor web search purposes.Install in OsmAndOnce you have the .sqlitedb file, copy it to OsmAnd's tiles folderin whatever way you prefer. For me, that'sadb push file.sqlitedb $androidSD/Android/data/net.osmand.plus/files/tileswhere $androidSD is the /storage/whatever location ofmy device's SD card.Then start OsmAnd and tap on the icon in the upper left for your current mode(car, bike, walking etc.) to bring up the Configure map menu.Scroll down to Overlay or Underlay map, enable one ofthose two and you should be able to choose your newly installed map.You can adjust the overlay's transparency with a slider that's visibleat the bottom of the map (the blue slider just above the distance scale),so you can see your overlay and the main map at the same time.The overlay disappears if you zoom out too far, and I haven't yet figuredout what controls that; I'm still working on those details.Sure, this process is a lot of work. But the result is worth it.Check out the geologic layers we walked through on a portion ofa recent hike in Rendija Canyon (our hike is the purple path).

dd60e6d636
Reply all
Reply to author
Forward
0 new messages