OruxMaps
Visit the new forum: <a href="http://www.oruxmaps.com/foro">OruxMaps</a>

Advanced multi-layer map almost working, but some inconsistencies

Go down

Advanced multi-layer map almost working, but some inconsistencies Empty Advanced multi-layer map almost working, but some inconsistencies

Post  ppenguin on Wed Feb 09, 2011 2:32 pm

Hi,

First I'd like to congratulate Orux on his amazing software! I'm new, but already enthusiast!

I'm trying to make an advanced map with MOBAC which actually seems to almost work, it's a bit similar to what's described here, but that thread died sort of prematurely.

By "advanced" I mean that I have complete coverage of a country in the atlas, 1 map (directory) per province in e.g. zoom levels 8,9,10,11,12 and for cities within the province added 13,14,15,16,17

So here for the details:
My idea (schematic is the same as in the layer tree of MOBAC):
Code:

Country (atlas)
  |
  --- province 1
  |      area 1
  |      area 2
  |      area 3 
  --- province 2
  |      area 1
  |      area 2
  .....

area x is a rectangular selection for one zoom level.

My procedure to make this atlas is (all in MOBAC):

  1. name atlas (China)
  2. check zoom levels for province (8-12)
  3. type name of selection (e.g. "Sichuan")
  4. select area 1
  5. add selection (it adds a "folder" "Sichuan" to the tree containing items "Sichuan 8" ... "Sichuan 12")
  6. select area 2
  7. add selection (it adds a "folder" "Sichuan_1" to the tree containing items "Sichuan_1 8" ... "Sichuan_1 12")
  8. repeat steps (4-5) until all area of the province is covered
  9. now I "drag&drop" "Sichuan_1" onto "Sichuan", which results in the contents being merged. So now I have under "Sichuan" the items "Sichuan 8" ... "Sichuan 12" and "Sichuan_1 8" ... "Sichuan_1 12". (And "folder" "Sichuan_1" is gone)
  10. repeat this for remaining "Sichuan_x"
  11. now I select zoom levels 13,14,15,16,17 (de-select 8-12)
  12. select area of a city (e.g. Chengdu, which is in the province of Sichuan), give it the name "Chengdu" and then press "add selection"
  13. this step is also repeated (if necessary) until the complete city area is covered (because the city is not rectangular so it is combined from smaller rectangular areas)
  14. all "folders" "Chengdu_x" are first consolidated with (dropped into) "Chengdu" and then "Chengdu" is dropped into "Sichuan"
  15. now we have an atlas called "China" with under it a "folder" called "Sichuan" which contains the items "Sichuan 8", ..., "Sichuan 12", ..., "Sichuan_1 8", ..., "Sichuan_x 12", "Chengdu 13", ..., "Chengdu_x 17"
  16. if necessary, add more provinces in the same way
  17. now create atlas (format OruxMaps sqlitedb)
  18. after finished, copy resulting directory "Sichuan" (and possibly more provinces, each has an own directory, which contains 1 xml and 1 db file) to SD card


And now, what happens? It actually works quite well, but I encounter the following:

  1. I can open the province map, and zoom from 8 to 12
  2. If I go to an area of a city (for which I saved zoom levels 13-17) and zoom further, I get zoom level 13 (as expected) but apparently only the tile-set of the first city I selected during making this map (i.e. the first tile-set with zoom level 13 and above.) That means it warps me away from the place I was.
  3. at this point it's stuck, I cannot zoom in or out, only scroll.


Any ideas what's going on here?

BTW: if I generate the same atlas in format RMAP Sqlitedb and test with RMAP or Locus, it works as expected, it works seamless and fast, even though my atlas (complete level 8-12 coverage of Eastern China from Heilongjiang to Zhejiang and 13-17 level zoom for about 5 cities per province) is about 1.5GB large. Interestingly, however, the Orux map is about 3x smaller than the RMAPS version, could it be missing tiles? The xml file for the OruxMap seems to contain all expected entries though.

TIA for any ideas.

ppenguin

Cantidad de envíos : 5
Fecha de inscripción : 2011-02-09

View user profile

Back to top Go down

Advanced multi-layer map almost working, but some inconsistencies Empty Re: Advanced multi-layer map almost working, but some inconsistencies

Post  orux on Wed Feb 09, 2011 6:49 pm

ppenguin wrote:Hi,

First I'd like to congratulate Orux on his amazing software! I'm new, but already enthusiast!

I'm trying to make an advanced map with MOBAC which actually seems to almost work, it's a bit similar to what's described here, but that thread died sort of prematurely.

By "advanced" I mean that I have complete coverage of a country in the atlas, 1 map (directory) per province in e.g. zoom levels 8,9,10,11,12 and for cities within the province added 13,14,15,16,17

So here for the details:
My idea (schematic is the same as in the layer tree of MOBAC):
Code:

Country (atlas)
  |
  --- province 1
  |      area 1
  |      area 2
  |      area 3 
  --- province 2
  |      area 1
  |      area 2
  .....

area x is a rectangular selection for one zoom level.

My procedure to make this atlas is (all in MOBAC):

  1. name atlas (China)
  2. check zoom levels for province (8-12)
  3. type name of selection (e.g. "Sichuan")
  4. select area 1
  5. add selection (it adds a "folder" "Sichuan" to the tree containing items "Sichuan 8" ... "Sichuan 12")
  6. select area 2
  7. add selection (it adds a "folder" "Sichuan_1" to the tree containing items "Sichuan_1 8" ... "Sichuan_1 12")
  8. repeat steps (4-5) until all area of the province is covered
  9. now I "drag&drop" "Sichuan_1" onto "Sichuan", which results in the contents being merged. So now I have under "Sichuan" the items "Sichuan 8" ... "Sichuan 12" and "Sichuan_1 8" ... "Sichuan_1 12". (And "folder" "Sichuan_1" is gone)
  10. repeat this for remaining "Sichuan_x"
  11. now I select zoom levels 13,14,15,16,17 (de-select 8-12)
  12. select area of a city (e.g. Chengdu, which is in the province of Sichuan), give it the name "Chengdu" and then press "add selection"
  13. this step is also repeated (if necessary) until the complete city area is covered (because the city is not rectangular so it is combined from smaller rectangular areas)
  14. all "folders" "Chengdu_x" are first consolidated with (dropped into) "Chengdu" and then "Chengdu" is dropped into "Sichuan"
  15. now we have an atlas called "China" with under it a "folder" called "Sichuan" which contains the items "Sichuan 8", ..., "Sichuan 12", ..., "Sichuan_1 8", ..., "Sichuan_x 12", "Chengdu 13", ..., "Chengdu_x 17"
  16. if necessary, add more provinces in the same way
  17. now create atlas (format OruxMaps sqlitedb)
  18. after finished, copy resulting directory "Sichuan" (and possibly more provinces, each has an own directory, which contains 1 xml and 1 db file) to SD card


And now, what happens? It actually works quite well, but I encounter the following:

  1. I can open the province map, and zoom from 8 to 12
  2. If I go to an area of a city (for which I saved zoom levels 13-17) and zoom further, I get zoom level 13 (as expected) but apparently only the tile-set of the first city I selected during making this map (i.e. the first tile-set with zoom level 13 and above.) That means it warps me away from the place I was.
  3. at this point it's stuck, I cannot zoom in or out, only scroll.


Any ideas what's going on here?

BTW: if I generate the same atlas in format RMAP Sqlitedb and test with RMAP or Locus, it works as expected, it works seamless and fast, even though my atlas (complete level 8-12 coverage of Eastern China from Heilongjiang to Zhejiang and 13-17 level zoom for about 5 cities per province) is about 1.5GB large. Interestingly, however, the Orux map is about 3x smaller than the RMAPS version, could it be missing tiles? The xml file for the OruxMap seems to contain all expected entries though.

TIA for any ideas.

Hi, ppenguin;

Thanks, and sorry, because OruxMaps is not ready for those 'advanced' maps.

OruxMaps can not manage a map database if there are more than one map with the same zoom level.

I have to see how to fix the code in mobac.

Anyway, OruxMaps could handle all the maps if you do not make the step of 'drag & drop'.

With the new version (http://www.oruxmaps.com/cs), you can organize your maps into folders in the directory of OruxMaps maps, getting the same effect.

China/
--china_map
--provinces/
----Sichuan/
------Sichuan_1_map
------Sichuan_2_map
------cities/
--------Chengdu/
....

Where *_map are the created maps.

I know is tedious, but it is the only solution that will work with current version.

orux


_________________
Ahora puedes contribuir:--> DONACIÓN
Now you can contribute:--> DONATE
orux
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

View user profile

Back to top Go down

Advanced multi-layer map almost working, but some inconsistencies Empty Re: Advanced multi-layer map almost working, but some inconsistencies

Post  ppenguin on Thu Feb 10, 2011 3:17 pm

Hi Orux,

Thanks!

That gives me the idea to sort of "tweak" the saved mobac atlas profile to divide/ sort the layers in a way that oruxmaps can handle (maybe by an external script), but I suppose you mean something similar by
I have to see how to fix the code in mobac
(however, this would basically amount to programmatically "undo" my drag and drop actions)

Anyway, it might be easier to just not consolidate my map layers, it will look messy but is actually less work (not counting the lost work for my current map)
Much would be helped by non-rectangular selection possibility in mobac as well (unfortunately the newest preview version which apparently supports this didn't work for me)

One question though, why is oruxmaps so particular about the directory structure? The rmaps format seems to be effective too. Is it not possible to scan all xml files on first load, build an index and then load any required tile sets as needed?

Thanks for sharing your ideas and info!

Cheers,

ppenguin


Last edited by ppenguin on Thu Feb 10, 2011 3:21 pm; edited 2 times in total (Reason for editing : Typos)

ppenguin

Cantidad de envíos : 5
Fecha de inscripción : 2011-02-09

View user profile

Back to top Go down

Advanced multi-layer map almost working, but some inconsistencies Empty Re: Advanced multi-layer map almost working, but some inconsistencies

Post  orux on Thu Feb 10, 2011 7:58 pm

ppenguin wrote:Hi Orux,

Thanks!

That gives me the idea to sort of "tweak" the saved mobac atlas profile to divide/ sort the layers in a way that oruxmaps can handle (maybe by an external script), but I suppose you mean something similar by
I have to see how to fix the code in mobac
(however, this would basically amount to programmatically "undo" my drag and drop actions)

Anyway, it might be easier to just not consolidate my map layers, it will look messy but is actually less work (not counting the lost work for my current map)
Much would be helped by non-rectangular selection possibility in mobac as well (unfortunately the newest preview version which apparently supports this didn't work for me)

One question though, why is oruxmaps so particular about the directory structure? The rmaps format seems to be effective too. Is it not possible to scan all xml files on first load, build an index and then load any required tile sets as needed?

Thanks for sharing your ideas and info!

Cheers,

ppenguin

Hi;

not so easy;

can rmaps jump from one map to another automatically?
can you use maps with different projection than mercator (Lambert, utm,...)?
...

OruxMaps needs more info, and a different information structure.

The problem is that MAC packages the maps in a way that does not understand OruxMaps.

orux

_________________
Ahora puedes contribuir:--> DONACIÓN
Now you can contribute:--> DONATE
orux
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

View user profile

Back to top Go down

Advanced multi-layer map almost working, but some inconsistencies Empty Re: Advanced multi-layer map almost working, but some inconsistencies

Post  ppenguin on Sat Feb 19, 2011 1:49 am

Hi orux,

sorry for being silent a while, been too busy.

I'm just downloading a new atlas, for which I "de-consolidated" the layers as you said. I'll test it.

Actually it came to my mind that in fact it may even be better to have all these different db files in different dirs (i.e. orux style) than in one big sqlitedb (like rmaps), because in this way I can selectively update the map (i.e. just replace a specific dir with new content if e.g. I need more coverage or zoom levels). Is this true, or is there some kind of top-level index which also needs to be updated?

Thanks!

UPDATE
It seems to work in principle.
I've been messing with the mobac xml file (atlas definition) though, and it seems that some maps do not work. I suspect this has to do with the layer/map naming. Could anybody tell me what the requirements are?
I.e. does the map name have to be related to the layer name, and can directories be renamed without problems?
Is there a length restriction? (Otherwise I could use the name to present the hierarchy, like e.g. CN_Jiangsu_Suzhou)

ppenguin

Cantidad de envíos : 5
Fecha de inscripción : 2011-02-09

View user profile

Back to top Go down

Advanced multi-layer map almost working, but some inconsistencies Empty Re: Advanced multi-layer map almost working, but some inconsistencies

Post  orux on Sat Feb 19, 2011 7:22 pm

ppenguin wrote:Hi orux,

sorry for being silent a while, been too busy.

I'm just downloading a new atlas, for which I "de-consolidated" the layers as you said. I'll test it.

Actually it came to my mind that in fact it may even be better to have all these different db files in different dirs (i.e. orux style) than in one big sqlitedb (like rmaps), because in this way I can selectively update the map (i.e. just replace a specific dir with new content if e.g. I need more coverage or zoom levels). Is this true, or is there some kind of top-level index which also needs to be updated?

Hi, ppenguin;

You are right. You can selectively update the maps. OruxMaps uses an internal database, because parsing xml is a heavy task. Each time you start OruxMaps, the app will check the mapfile/ directory looking for new/deleted maps.

IMPORTANT: if you change a map with other with the same name, you have to use 'update maps' in menu, main screen.

ppenguin wrote:
UPDATE
It seems to work in principle.
I've been messing with the mobac xml file (atlas definition) though, and it seems that some maps do not work. I suspect this has to do with the layer/map naming. Could anybody tell me what the requirements are?
I.e. does the map name have to be related to the layer name, and can directories be renamed without problems?
Is there a length restriction? (Otherwise I could use the name to present the hierarchy, like e.g. CN_Jiangsu_Suzhou)

There is no name restriction.

have you got different maps with the same name?
have you changed something by hand inside the xml files?

orux



_________________
Ahora puedes contribuir:--> DONACIÓN
Now you can contribute:--> DONATE
orux
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

View user profile

Back to top Go down

Advanced multi-layer map almost working, but some inconsistencies Empty Re: Advanced multi-layer map almost working, but some inconsistencies

Post  ppenguin on Sun Feb 20, 2011 1:24 am

thanks!

I did change the mobac xml file by hand (quicker), although I only added layer tags. anyway, I do take full responsibility for this not working, the atlas is quite large, so it's hard to spot errors. Twisted Evil
So never mind this issue, thanks for the info!

(I'm re-doing the atlas, since with the split files I won't have the 2gb barrier anyway, I'm setting it up with new naming and more complete)

UPDATE: the China atlas done in this way seems to work ok, so I'll be adding more cities when I find time and upload the profile to the mobac forums (and here if there's interest)
I estimate the final size will be around 3gb (complete coverage level 4-12, most important cities (about 4-8 per province) level 13-17) (tiles jpg 50%)

cheers

ppenguin

Cantidad de envíos : 5
Fecha de inscripción : 2011-02-09

View user profile

Back to top Go down

Advanced multi-layer map almost working, but some inconsistencies Empty Re: Advanced multi-layer map almost working, but some inconsistencies

Post  bengtang on Sat Jun 23, 2012 6:30 am

ppenguin wrote:thanks!
UPDATE: the China atlas done in this way seems to work ok, so I'll be adding more cities when I find time and upload the profile to the mobac forums (and here if there's interest)
I estimate the final size will be around 3gb (complete coverage level 4-12, most important cities (about 4-8 per province) level 13-17) (tiles jpg 50%)
cheers

Hi ppenguin, could you describe in more detail how you got it to work?

I want to have an atlas map of a country with 2 different types of map: one OSM mapnik, and another showing satellite photos. Both are sqlite db files. Is it possible to have them both in the same atlas if they use the same zoom levels? What should the directory structure be like?

Also I saw that you said that the new version of MOBAC did not work for you, why is this? Do you know you can add back the deleted map types as custom maps in MOBAC 1.9.7 ? You just have to make a xml file and put in the mapsources folder of MOBAC following instructions here: http://sourceforge.net/apps/mediawiki/mobac/index.php?title=Custom_XML_Map_Sources and http://mobac.sourceforge.net/MOBAC/README.HTM#CustomMultiLayerMapSource

Here are some examples:
Google map
Code:
<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
            <name>Google Map</name>
            <minZoom>0</minZoom>
            <maxZoom>19</maxZoom>
            <tileType>PNG</tileType>
            <tileUpdate>IfNoneMatch</tileUpdate>
<url>http://mt{$serverpart}.google.com/vt/lyrs=m@177382431&#38;x={$x}&#38;y={$y}&#38;z={$z}&#38;s=Galileo</url>
<serverParts>0 1</serverParts>
<backgroundColor>#E5E3DF</backgroundColor>
</customMapSource>

Google satellite / Google earth photos
Code:
<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
            <name>Google Satellite</name>
            <minZoom>0</minZoom>
            <maxZoom>18</maxZoom>
            <tileType>JPG</tileType>
            <tileUpdate>IfNoneMatch</tileUpdate>
<url>http://khm{$serverpart}.google.com.sg/kh/v=113&#38;src=app&#38;x={$x}&#38;y={$y}&#38;z={$z}&#38;s=Galileo</url>
<serverParts>0 1</serverParts>
<backgroundColor>#E5E3DF</backgroundColor>
</customMapSource>

OSM cycle map
Code:
<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
<name>OSM Cycle Map</name>
<minZoom>0</minZoom>
<maxZoom>18</maxZoom>
<tileType>png</tileType>
<tileUpdate>IfNoneMatch</tileUpdate>
<url>http://{$serverpart}.tile.opencyclemap.org/cycle/{$z}/{$x}/{$y}.png</url>
<serverParts>a b c</serverParts>
<backgroundColor>#000000</backgroundColor>
</customMapSource>

bengtang

Cantidad de envíos : 1
Fecha de inscripción : 2012-06-23

View user profile

Back to top Go down

Advanced multi-layer map almost working, but some inconsistencies Empty custom map source

Post  crknnuts on Thu Feb 28, 2013 9:58 am

bengtang wrote:
ppenguin wrote:thanks!
UPDATE: the China atlas done in this way seems to work ok, so I'll be adding more cities when I find time and upload the profile to the mobac forums (and here if there's interest)
I estimate the final size will be around 3gb (complete coverage level 4-12, most important cities (about 4-8 per province) level 13-17) (tiles jpg 50%)
cheers

Hi ppenguin, could you describe in more detail how you got it to work?

I want to have an atlas map of a country with 2 different types of map: one OSM mapnik, and another showing satellite photos. Both are sqlite db files. Is it possible to have them both in the same atlas if they use the same zoom levels? What should the directory structure be like?

Also I saw that you said that the new version of MOBAC did not work for you, why is this? Do you know you can add back the deleted map types as custom maps in MOBAC 1.9.7 ? You just have to make a xml file and put in the mapsources folder of MOBAC following instructions here: http://sourceforge.net/apps/mediawiki/mobac/index.php?title=Custom_XML_Map_Sources and http://mobac.sourceforge.net/MOBAC/README.HTM#CustomMultiLayerMapSource

Here are some examples:
Google map
Code:
<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
            <name>Google Map</name>
            <minZoom>0</minZoom>
            <maxZoom>19</maxZoom>
            <tileType>PNG</tileType>
            <tileUpdate>IfNoneMatch</tileUpdate>
<url>http://mt{$serverpart}.google.com/vt/lyrs=m@177382431&x={$x}&y={$y}&z={$z}&s=Galileo</url>
<serverParts>0 1</serverParts>
<backgroundColor>#E5E3DF</backgroundColor>
</customMapSource>

Google satellite / Google earth photos
Code:
<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
            <name>Google Satellite</name>
            <minZoom>0</minZoom>
            <maxZoom>18</maxZoom>
            <tileType>JPG</tileType>
            <tileUpdate>IfNoneMatch</tileUpdate>
<url>http://khm{$serverpart}.google.com.sg/kh/v=113&src=app&x={$x}&y={$y}&z={$z}&s=Galileo</url>
<serverParts>0 1</serverParts>
<backgroundColor>#E5E3DF</backgroundColor>
</customMapSource>

OSM cycle map
Code:
<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
<name>OSM Cycle Map</name>
<minZoom>0</minZoom>
<maxZoom>18</maxZoom>
<tileType>png</tileType>
<tileUpdate>IfNoneMatch</tileUpdate>
<url>http://{$serverpart}.tile.opencyclemap.org/cycle/{$z}/{$x}/{$y}.png</url>
<serverParts>a b c</serverParts>
<backgroundColor>#000000</backgroundColor>
</customMapSource>

Hello,

New on this forum. Bengtang, do you have the custom map source code for Google hybrid maps, that have satellite images with roads overlayed? I was trying to create an offline map using Google but it is no longer available in the newest version of MOBAC. I am currently using Microsoft hybrid map source but it isn't as up to date as the Google maps are. Sorry for changing topic but noticed you talked about adding custom map source on MOBAC.

Thanks for the help

crknnuts

Cantidad de envíos : 1
Fecha de inscripción : 2013-02-28

View user profile

Back to top Go down

Advanced multi-layer map almost working, but some inconsistencies Empty Re: Advanced multi-layer map almost working, but some inconsistencies

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum