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

Scan (raster) maps with AQ / AQM

It's all about maps...
Post Reply
Vincent

Scan (raster) maps with AQ / AQM

Post by Vincent »

Hello,

I need to display raster maps on my device, wich I've scanned and I can georeference.
I didn't see the way to do this in Mobile Atlas Creator, do you know how to achieve this ? or how to "compile" an AQM file with custom png tiles ?

Tnak you in advance
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: Scan (raster) maps with AQ / AQM

Post by Psyberia-Support »

Hi Vincent,

Right now there is no way to use scanned/raster maps in AlpineQuest (as of version 1.0.3).
This feature has already been asked in the French part of this forum, and it will be added in a future version of AlpineQuest (should be in 1.0.5).
Thank you for pointing us this lack of feature.
Regards
Do you like AlpineQuest ? Leave a small comment on Google Play !
cpsf

Re: Scan (raster) maps with AQ / AQM

Post by cpsf »

I think this would be a great feature, one that I would find very useful indeed. However, it occurs to me that you may have to deal with alternative co-ordinate systems if you are going to import existing raster images. For example, many map images for the UK would be based on British National Grid (BNG) rather than latitude and longitude.

It seems to me that AlpineQuest will have to be able to convert between lat/long and BNG or other systems, if it is to display a wide variety of raster images without spatial transformation; otherwise I assume the images would have to be transformed on the PC before copying to the phone. I think using the native co-ordinate system with untransformed images would be better by far, if it’s possible. (Perhaps the GDAL library could help, as it knows how to do conversions between a huge range of co-ordinate systems.)

My apologies if you’re already thinking about this issue, but I thought it was worth pointing out in case you weren’t. All the best mobile mapping apps I've used can deal with multiple co-ordinate systems, and I believe this enhancement would raise AlpineQuest into a different class.
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: Scan (raster) maps with AQ / AQM

Post by Psyberia-Support »

In a comment on the Android Market, a user (Mark) asked for OS grid reference support, which is, as far as I understand, the BNG.

But I didn't realized that this feature is closely linked to raster map support as explained by cpsf (thanks!).
I will have to include this feature, and will also include the UTM system (which as also been requested by Borg). I will have a look at the GDAL library.

The best thing would be to have a map system independent from the AlpineQuest display system, so that users can also use the BNG with OpenStreetMap maps for exemple.

I updated the roadmap and will try to work on that soon cause it seems to be an important feature...
Thanks for your explanations, cause I'm not familiar with these systems!
Do you like AlpineQuest ? Leave a small comment on Google Play !
cpsf

Re: Scan (raster) maps with AQ / AQM

Post by cpsf »

It would be correct to say that OS maps use the BNG system. It’s a very simple system, probably one of the simplest; it just measures the distances east and north, in metres, from a point of origin in the Atlantic to the south-west of Great Britain. The scale of a map image can thus be expressed as a number of metres per pixel.

Are you thinking of enhancing the AQM file format so it stores the grid system used in the calibration? It seems to me that would be a neat way of doing it, and might be the simplest way for the AlpineQuest display app to deal with different systems. The scaling between geographical position in native co-ordinates and screen position will then always be linear.

Also, can I propose that when you make the additions to allow importing from existing raster images, that you also automatically import the calibration information if it’s present - at least for the more common map formats? I would suggest the open standard Geotiff and OziExplorer as good ones to start with as they seem quite common. And finally (for the moment), could you include a batch processing mode to convert multiple files in on operation?
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: Scan (raster) maps with AQ / AQM

Post by Psyberia-Support »

The easiest way should be to open OziExplorer maps directly with AlpineQuest. I have to look at this format specification in order to see if it could be possible.
I also think that the AQM format could be used without deep modifications, because it is quite simple and generic: it only needs to know the origin of images and the coordinate/pixel ratio for x and y axis. Only mercator and equirectangular projections are handle but it has been thought so that other ones can be easily added.
I'll get you informed of what will be done soon...
Regards
Do you like AlpineQuest ? Leave a small comment on Google Play !
prop
Posts: 5
Joined: Tue Apr 26, 2011 7:48 am

Re: Scan (raster) maps with AQ / AQM

Post by prop »

AlpineQuest wrote:The easiest way should be to open OziExplorer maps directly with AlpineQuest. I have to look at this format specification in order to see if it could be possible.
I also think that the AQM format could be used without deep modifications, because it is quite simple and generic: it only needs to know the origin of images and the coordinate/pixel ratio for x and y axis. Only mercator and equirectangular projections are handle but it has been thought so that other ones can be easily added.
I'll get you informed of what will be done soon...
Regards
Hi I am a new user, Thanks for some great software it does a great job.
I am just checking out the forums and spotted this topic, has anything elese been done on this as it would be very usefull for me as well.

Thanks
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: Scan (raster) maps with AQ / AQM

Post by Psyberia-Support »

This feature is unfortunately still missing...
It is still on top of planned features, I just need to find some time to read raster format specifications. I'll put all my effort to do this as soon as possible.
Thanks for your feedback.
Do you like AlpineQuest ? Leave a small comment on Google Play !
cdufour
Posts: 4
Joined: Mon Nov 01, 2010 10:26 am

Re: Scan (raster) maps with AQ / AQM

Post by cdufour »

Hello,

I found a solution to this "problem" for those who are not afraid of GDAL (http://www.gdal.org/) and MOBAC (http://mobac.sourceforge.net/):

1. (pre-requisite) Have a fully geo-referenced raster map (check with gdalinfo)

2. Create an RGBA virtual raster from the source file (required by gdal2tiles.py):

Code: Select all

gdal_translate -of vrt -expand rgba /path/to/source/map.tif /path/to/TMS/map.vrt
3. Create World Mercator tiles (EPSG:3857) with gdal2tiles.py:

Code: Select all

gdal2tiles.py -e -r antialias -z 8-10 /path/to/TMS/map.vrt
PS: adapt the zoom levels - -z ... - to match your requirements; roughly put

Code: Select all

...
12 <-> ~1:250'000
11 <-> ~1:500'000
10 <-> ~1:1'000'000
9 <-> ~1:2'000'000
8 <-> ~1:4'000'000
...
NOTE: map tiles will be created as /path/to/TMS/map/zoom/x/y.png

4. Create a MOBAC local files map source; in /path/to/MOBAC/mapsources/map.mapsource.xml:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<localTileFiles>
  <name>My Map</name>
  <sourceType>DIR_ZOOM_X_Y</sourceType>
  <sourceFolder>/path/to/TMS/map</sourceFolder>
  <invertYCoordinate>true</invertYCoordinate>
  <backgroundColor>#000000</backgroundColor>
</localTileFiles>
5. Open MOBAC, select your local files map source ("My Map"; see 4.) and create your Alpine Quest (*.aqm) atlas

Done!

(I successfully applied this process to Switzerland topographic and OACI charts, as well as France OACI charts)

Cheers,

Cédric
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: Scan (raster) maps with AQ / AQM

Post by Psyberia-Support »

Hi and thanks for this tutorial.
I'm very interested in improving this kind of process.
Do you think that making AlpineQuest supporting the "map.mapsource.xml" file format would be very useful and save time? (so MOBAC would not be used anymore in that case).
I'll try to do it.
Best regards
Do you like AlpineQuest ? Leave a small comment on Google Play !
cdufour
Posts: 4
Joined: Mon Nov 01, 2010 10:26 am

Re: Scan (raster) maps with AQ / AQM

Post by cdufour »

Hello,
Thanks for your feedback.
What comes to my mind when talking of removing the MOBAC steps:
1. pro: less work (and one less software to install/master)
2. pro/con (?): maybe more/less efficient for AQ to read the tiles (from the directory structure instead of a single - potentially huge - file)
3. con: map are less easy to transfer from/to device (entire directory structure instead of a single AQM file); *nix and rsync users may love it though
That being said, I think it would globally be a good idea. Allowing users to "easily" use any map source is undoubtly a plus.
I quoted "easily" because GDAL is definitely not the easiest and most intuitive software suite there is (and properly geo-referencing raster material may be quite tricky, given the fancy projections suppliers sometime use) ... but in the end, one can use virtually any raster map.
Cheers,
Cédric
Post Reply