combine two map

846 views
Skip to first unread message

Антон Лунегов

unread,
May 28, 2015, 12:57:01 AM5/28/15
to mapsfo...@googlegroups.com
Hello there. Can i combine two .map through osmosis or anothe way?

Ludwig

unread,
May 28, 2015, 1:33:42 AM5/28/15
to mapsfo...@googlegroups.com
There is no way to combine two mapsforge map files into one file, but you can 
The second solution scans both files for data and is meant for situations where you want to combine multiple independent map files into one view.

Ludwig

On 28 May 2015 at 05:57, Антон Лунегов <lune...@gmail.com> wrote:
Hello there. Can i combine two .map through osmosis or anothe way?

--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/46a7bfd2-023f-490c-bc79-f3a47cbec894%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Emux

unread,
May 28, 2015, 2:05:24 AM5/28/15
to mapsfo...@googlegroups.com
On 28/05/2015 08:33 πμ, Ludwig wrote:
The second solution scans both files for data and is meant for situations where you want to combine multiple independent map files into one view.

Note that you'll use the same render theme for all map files.

--
Emux
Cruiser - Atlas

Антон Лунегов

unread,
May 28, 2015, 3:34:28 AM5/28/15
to mapsfo...@googlegroups.com
Can you say me please, how to add multiple  input files ? Yes, i was seeing osmosis documentation, but didn't find it(

четверг, 28 мая 2015 г., 10:33:42 UTC+5 пользователь Ludwig написал:

Emux

unread,
May 28, 2015, 3:40:48 AM5/28/15
to mapsfo...@googlegroups.com
You need to play with the --merge task.

Антон Лунегов

unread,
May 28, 2015, 3:56:47 AM5/28/15
to mapsfo...@googlegroups.com
Yes, i'm finding it. But this parameter creates one big .osm.pbf file. For example:
osmosis --read-pbf czech-republic-latest.osm.pbf --read-pbf czech_srtm.osm.pbf --merge --wb omitmetadata=true czech-merged.osm.pbf
osmosis --read-pbf czech-merged.osm.pbf --buffer --mapfile-writer file=/tmp/Czech-2015-03-07.map.nJN0 bbox=48.542920,12.084770,51.064260,18.863210 type=hd

And I want to create .map file at once. Can i do this?

четверг, 28 мая 2015 г., 12:40:48 UTC+5 пользователь Emux написал:

Ludwig

unread,
May 28, 2015, 4:02:44 AM5/28/15
to mapsfo...@googlegroups.com
You can omit the step of creating the pbf file and directly feed the output into the mapwriter in one osmosis call. 
osmosis --read-pbf czech-republic-latest.osm.pbf --read-pbf czech_srtm.osm.pbf --merge  --mapfile-writer file=/tmp/Czech-2015-03-07.map.nJN0 bbox=48.542920,12.084770,51.064260,18.863210 type=hd

However, it might be easier to do in two steps.


--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.

Антон Лунегов

unread,
May 28, 2015, 4:07:00 AM5/28/15
to mapsfo...@googlegroups.com
Thank you, I will try it.

четверг, 28 мая 2015 г., 13:02:44 UTC+5 пользователь Ludwig написал:

Антон Лунегов

unread,
May 28, 2015, 5:12:41 AM5/28/15
to mapsfo...@googlegroups.com
This isn't working( 


D:\ADM900\Карты\russia_map\osmosis-latest\bin>osmosis.bat --read-pbf file=D:\RU-
PER.osm.pbf --read-pbf file=D:\RU-KIR.osm.pbf --merge --mapfile-writer file=D:\P
ERandKIR2.map tyle=hd
ьр  28, 2015 2:06:11 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.43.1
ьр  28, 2015 2:06:12 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
ьр  28, 2015 2:06:12 PM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init
>
INFO: mapfile-writer version: mapsforge-map-writer-0.5.1
ьр  28, 2015 2:06:12 PM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init
>
INFO: mapfile format specification version: 3
ьр  28, 2015 2:06:12 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Argument tyle for task 4
-mapfile-writer was not recognised.
        at org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactory.cre
ateTaskManager(TaskManagerFactory.java:64)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.buildTasks(Pi
peline.java:50)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare(Pipel
ine.java:112)
        at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:86)
        at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Laun
cher.java:329)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:239)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:47) 




четверг, 28 мая 2015 г., 13:07:00 UTC+5 пользователь Антон Лунегов написал:

Ludwig

unread,
May 28, 2015, 5:16:04 AM5/28/15
to mapsfo...@googlegroups.com
There is simply some syntax error on the command line, in principle this works.

--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.

Emux

unread,
May 28, 2015, 5:29:57 AM5/28/15
to mapsfo...@googlegroups.com
Check the stack trace, you have mistyped type=hd.

Антон Лунегов

unread,
May 28, 2015, 6:05:47 AM5/28/15
to mapsfo...@googlegroups.com
Yep, it's working now) My mistake.

четверг, 28 мая 2015 г., 14:29:57 UTC+5 пользователь Emux написал:
Reply all
Reply to author
Forward
0 new messages