QGIS to Orux

Started by dan, October 19, 2020, 10:00:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dan

Hello,

I am a beginner with QQIS trying to export a map to OruxMaps.
Can anyone tell me how to accomplish this?

Reading the OruxMaps pdf manual, the preferred format is an sqlite .db? The only program that I found that can create these is MOBAC, and I don't know how to get from QGIS to MOBAC.

Any pointers where to look are much appreciated.

d.

Lenz

Hello Dan,

this works for me:
https://help.locusmap.eu/topic/create-locus-maps-with-qgis-and-mobac

You have to use the plugin "QMetaTiles" as "QTiles" doesn't work in QGIS 3.14.

dan

Thank you! I will try it.

Do you know if its possible to make vector tiles this way? My starting file is a 1GB shp, so probably the mbtiles will be very large. We'll see if this is a problem.

The linked locus blog looks also very helpful: https://docs.locusmap.eu/doku.php?id=manual:advanced:map_tools:conversion

Lenz

Sorry, I never tried converting shp-files or other vector formats. I used QGIS and MOBAC for georeferenced raster maps a few years ago. After i read your question, i just tried the QMetaTiles plugin on an old georeferenced map and it worked.

dan

Thank you very much for the suggestion, I will try it out as soon as my current rendering job is done, it is just stuck in the middle of some other way I am trying. I'll let you know how it works.

dan

Hi Lenz,

I have some results. It is surprising how painful the conversion between map file formats is, and how badly it is documented. There seems to be no easy way to get from QGIS to mapsforge .map files.
I've collected all the information I have so far, hopefully it will be helpful for someone else:

The best two ways to export QGIS to Orux seem to be mbtiles. Sadly so far only raster data, but Orux loads even very large files reasonably fast.


1. QGIS with QMetaTiles Plugin
(This took a long time on my machine and I did not let it finish. QMetaTiles would have taken a week)
- Install QMetaTiles
- Run plugin, save as zip file
- Install MOBAC
- create a local tile file and put in mapsources folder, as described here: https://mobac.sourceforge.io/wiki/index.php/Custom_XML_Map_Sources#Local_Tile_files
<?xml version="1.0" encoding="UTF-8"?>
<localTileZip>
   <name>Custom map from tile zips</name>
   <sourceType>QUADKEY</sourceType>
   <zipFile>D:\MOBAC\LocalTiles\MapCruncher_test.zip</zipFile>
   <backgroundColor>#000000</backgroundColor>
</localTileZip>
- create a MOBAC sqlite file for OruxMaps, as described in the manual https://www.oruxmaps.com/oruxmapsmanual_en.pdf


2. QGIS
- Go to Processing Toolbox in QGIS.
- Raster tools, Generate XYZ tiles (MBTiles)
- this directly saves the mbtiles file.
- reasonably fast (about half a day), but the files are still massive



Other options:

- "Vector Tiles" item in the Processing Toolbox. Export as XYZ mbtiles. OruxMaps does not recognize the files.
- I've read somewhere that OruxMaps can read shapefiles directly, but this did not work for me.
- Converting the shapefile to KML might work for small files, but not for large maps.
- In theory there is a way shp->osm->map, as described in the Locus link above. This should be the best way, as it creates a vector map. Merkaartor does not load my shapefiles. Requires a lot of manual work
- there is a script shp2osm. First need ogr2ogr to convert the point coordinates to WGS84.  https://wiki.openstreetmap.org/wiki/Shp2osm
- Maps could be exported as geo pdf, which Orux reads nicely. I haven't tried, because my map is too large, but one could write a script that automatically tiles the map into many pdfs. Files are still rastered, so I don't see any advantage over the rastered mbtiles.
- QTiles does not seem to be supported anymore, but option 2 seems to be doing the same without a plugin.



Lenz

Hello Dan,

thank you for the information about the processing toolbox. "Generate xyz tiles" works fine on my georeferenced raster maps.
- Oruxmaps doesn't recognize toolbox's vector tiles (I tried with a very small shp) - maybe Orux has any idea on this.
- I have some shp files Oruxmaps can open as overlay but opening other shp files doesn' work. I'll try to figure out the differences of the shp files.