The support forum is temporarily read-only. For urgent requests, please email contact[at]psyberia.net

AQX to define zoom levels in groups of local files

Any question about the app? Ask it here
Post Reply
hamish
Posts: 31
Joined: Sun May 03, 2015 11:47 pm

AQX to define zoom levels in groups of local files

Post by hamish »

Could AQX be used to define how local files are loaded - so particular files could be assigned to different zoom levels?

In my case I often use maps saved in MBTiles format, but when I create them I have to use a range of zoom levels such as 12-19 or as single zoom levels.
Often I save large areas and the file size is many GB.
To keep file sizes to a minimum I'd like to be able to create files at particular zoom levels - then in AQ define a range of zoom levels that I want to apply to each file.

So for example I've downloaded the Ordnance Survey (Great Britain) Open Data contour lines https://osdatahub.os.uk/downloads/open/Terrain50 then using QGIS have defined how I would like them to display, then outputted MBTiles which I can then use as an overlay in AQ over any maps.
I quite like Bing Roads map with added contours
Screenshot_20220717.jpg
(1.46 MiB) Not downloaded yet
Here are some example files: (this forum doesn't recognise the straight MBTiles format so their zipped)
Zoom Levels 12 & 14
MBtilesExample--Z12--Z14.zip
(544.28 KiB) Downloaded 125 times

Zoom Level 17
MBtilesExample--Z17.zip
(1.82 MiB) Downloaded 119 times


If I try to load each file in AQ as an overlay at the same time the result is a bit of a mess.


In the specific case of MBTiles, I believe it is possible to merge files of different Zoom levels, but despite lots of trying I've been unsuccessful and it is rather beyond my low level of technical expertise.
geofactotem
Posts: 82
Joined: Mon Feb 07, 2022 7:21 pm

Re: AQX to define zoom levels in groups of local files

Post by geofactotem »

I must confess I am way out of my depth here, and it was the mention of vectors that caught my attention. This could quite easily be wrong but my understanding (if you can call it that) is that AQ is raster based and raster & vector don't mix. I subscribe to a service which provides a weekly map update for garmin devices and PC/MAC software. Thanks to AQ I am finding I am using my garmin less and less and will probably let my subscription lapse in September.

For want of a better word the PC file consists of a series of tiles eg: 66700035 Disc Image File. If that could be imported into AQ it would be rather good. It attempts to be a close match To OSGB in style. An example is below.
Neath.png
(788.81 KiB) Not downloaded yet
Any comment or pointer would be welcome.

Regards
David
hamish
Posts: 31
Joined: Sun May 03, 2015 11:47 pm

Re: AQX to define zoom levels in groups of local files

Post by hamish »

In the instance of using the contour data I'm inputting vector data into QGIS, manipulating it to desired style and outputting raster MBTiles which are compatible with AQ.
Online
boowoo
Posts: 512
Joined: Sat Mar 30, 2019 7:12 pm
Location: France

Re: AQX to define zoom levels in groups of local files

Post by boowoo »

Hi,
I do the same than Hamish (QGIS) for displaying a contour lines layer over any map in AQ.
François told me a long time ago that it should be possible to get contour lines layer from hgt files stored in AQ but it's an important work not implemented until now.
It should be also a very good alternative solution...
Psyberia-Support
Site Admin
Posts: 6406
Joined: Wed Apr 14, 2010 9:41 pm

Re: AQX to define zoom levels in groups of local files

Post by Psyberia-Support »

Hi,

Unfortunately you won't be able to do this with .aqx files.
However here are some hints of what's possible to do:

When you display a file based map, the application will display it beyond its zoom levels (called here "under and over-scaling). By default it's 2 zoom levels before, and 3 zoom levels after.
I guess this is why you get a big mess, some zoom levels must overlap. So a first solution would be to change those values to "0", or "1". However it will apply to all maps, so maybe not the best solution.

Code: Select all

maps.features.offlinemaps.underscaling_levels=0
maps.features.offlinemaps.overscaling_levels=0
Another solution would be to use favorite sets. Create a set for the lower levels with the maps you want, and another for the higher levels. You can do this in a dedicated workspace if you don't want to pollute your existing sets. However it will cost you 2 taps to change between higher and lower zoom levels.

A third solution would be to merge your maps as you suggest. I guess it can be done with MBTile maps using an SQLiteDB database editor that allows to merge 2 databases. However the application is also able to directly read tiles in a zip archive. So if QGIS is able to export your maps as simple tiles in structured folders instead of MBTiles, you can merge the maps by simply merge the two folder together. For zipped times, you must create a folder called "XYZ", then each zoom levels in sub-folder, then each x values in sub-folder, then each y values as file name. For example, tile "z=5/x=458/y=123" should be in folder "/XYZ/5/458/123.png" (or jpg).

Don't hesitate to ask for a specific point.

David, the application is actually able to read both raster and vectorial data. Raster data is handled as "maps", and vector data is handled as "placemark". All those supported formats are vectorial data.
What is called a "vector map", is simply very complete set of styled lines, polygons, labels, etc. But it's true that those complex vectorial formats are not supported by the app...
Do you like AlpineQuest ? Leave a small comment on Google Play !
edwardoo
Posts: 15
Joined: Tue Jan 26, 2021 10:41 pm

Re: AQX to define zoom levels in groups of local files

Post by edwardoo »

Hello,

I also use mbtiles split by area/zoom and it works mostly very well, except 2 issues:
  • Would it be possible to *not* display an overzoom of a top layer on a bottom layer which has the exact zoom ? Right now I have a "zoom 6 to 8" map on top of a "zoom 9 to 16" map, for zoom 9,10,11 AQ will display a over-scale pixelated version of the top layer.
  • The range of available zoom-levels (beyond which + and - buttons gray-out) is min_zoom-2 to max_zoom+3 as you said. But right now it is computed only on the first (bottom) layer. So if I have a "zoom 9 to 16" map on top of a "zoom 6 to 8" map, the max available zoom is still 8+3 = 11 !
Psyberia-Support
Site Admin
Posts: 6406
Joined: Wed Apr 14, 2010 9:41 pm

Re: AQX to define zoom levels in groups of local files

Post by Psyberia-Support »

Hi,
For the first problem, you can disable overscale for file based maps using this user setting:

Code: Select all

maps.features.offlinemaps.overscaling_levels=0
However it will apply to all file based maps. Right now there is no way to disable overscaling for a particular file-based maps, on the contrary of on-demand maps...

For the second problem, yes you're right, the application uses the map projection (and zoom levels) of the map at the bottom.
A workaround would be to add additional empty zoom levels to this map, or add another map below which has more zoom level. For example you can try to put a google map with a zero opacity at the bottom.
Do you like AlpineQuest ? Leave a small comment on Google Play !
edwardoo
Posts: 15
Joined: Tue Jan 26, 2021 10:41 pm

Re: AQX to define zoom levels in groups of local files

Post by edwardoo »

Thanks, I ended up putting a single white tile in my mbtiles at level 16, I should have put a transparent png instead but it works ok.

I didn't think of the Google maps workaround, but isn't it wasteful to download all these tiles? Ot does AQ have "smart" occlusion or transparency handling?
Psyberia-Support
Site Admin
Posts: 6406
Joined: Wed Apr 14, 2010 9:41 pm

Re: AQX to define zoom levels in groups of local files

Post by Psyberia-Support »

The app won't download the tiles if the layer is fully transparent or hidden ("eye" icon on the left).
Do you like AlpineQuest ? Leave a small comment on Google Play !
Post Reply