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

[done] Handling different map projections?

Any question about the app? Ask it here
Post Reply
Pascal5

[done] Handling different map projections?

Post by Pascal5 »

I understand that AQ handles ESPG3857 (WebMercator) projection natively.

Is there a way to use maps projected in other modes (for example ESPG2056 (Swiss LV03))?

Note that I do not require combining maps with different projections in the same display. I'm just fine having no base map if a different projection is used. I perfectly understand that reprojecting map tiles from one projection to another is a difficult process that should be avoided. Just having map tiles displayed in their native square shape whatever their projection would be fine.
Psyberia-Support
Site Admin
Posts: 6408
Joined: Wed Apr 14, 2010 9:41 pm

Re: Handling different map projections?

Post by Psyberia-Support »

Hi,

The application is able to handle a great variety of map projections, and is even able to reproject a map.
If means you can stack multiple maps with different map projections without problems.

The application uses the main map projection as the reference projection, then reproject other stacked maps (if any) in that projection.
The "main" main is the bottom most map you've added, not the "Base world map".

To create a map with a different map projection, you can simply do this:

Code: Select all

  <source id="MAP_ID">
    <name>Map EPSG:2056</name>
    <zoom-levels z="5,6,7,8">
      <projection-code>EPSG:2056</projection-code>
      <!-- ... -->
    </zoom-levels>
  </source>
You can have an advanced example here: https://www.alpinequest.net/en/help/v2/ ... mts_server
Do you like AlpineQuest ? Leave a small comment on Google Play !
Pascal5

Re: Handling different map projections?

Post by Pascal5 »

Oh, that's great! Your app is awesomely packed with useful features!!!

Yet, I guess that this procedure applies for adding custom on-demand maps.

But, if I download tiles and create an offline map using my own software (I typically use RMap sqlite format), what should I precisely do? How do I specify to use my own map file instead of a server?

Also, can I use such xml file to specify the bounding boxes of my own offline maps? Currently, AQ fails to compute the bounding boxes of my very large maps (those containing millions of tiles).
Psyberia-Support
Site Admin
Posts: 6408
Joined: Wed Apr 14, 2010 9:41 pm

Re: Handling different map projections?

Post by Psyberia-Support »

Unfortunately RMap and MBTile sqlite formats do not support custom map projections. Those formats also do not provide a standardized bounding box definition, so the app needs to manually check all tiles, and it can take a long time based on the map size (then the bounding box is stored, so this is only the first time the map is read).

But the GeoPackage format (OGC standard) can help you. It also use the sqlite container, but allows any map projection, and has a clear bounding box definition. However it's a bit more complicated, but it's the price to pay if you want to support other map projections. You'll basically need 4 tables for the map, one more for the projection definition. There are plenty example online, but you can ask me if you have any questions. Note that the application only support raster GeoPackage (not vector GeoPackage).
Do you like AlpineQuest ? Leave a small comment on Google Play !
Pascal5

Re: Handling different map projections?

Post by Pascal5 »

I will look into this.

Thanks for your help!
Pascal5

Re: Handling different map projections?

Post by Pascal5 »

Oh, I wish you could quickly extend your RMap loader so as to support an optional table specifying a bounding box!

I suggest: CREATE TABLE IF NOT EXISTS bounds(xm INTEGER, xn INTEGER, ym INTEGER, yn INTEGER, z INTEGER)
Specifying the bounding box for each used zoom level (with z being actually 17-zoom so as to be consistent with the RMap format).

Given the way SQLite works, I don't think this would break the file compatibility with other software.

Since I create my own maps by myself, I will start using this on the spot. And hopefully, MOBAC developers would agree to support that as well.

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

Re: Handling different map projections?

Post by Psyberia-Support »

Hi again, sorry for the delay,
Unfortunately I'll not find the time to work on a personalized feature yet based on the amount of waiting stuff I have, especially if another very similar format addresses all the problems mentioned.
Geopackage is a standardized, well documented and opensource format, you should really consider using it.
Do you like AlpineQuest ? Leave a small comment on Google Play !
Post Reply