Own offline maps with seamarks

342 views
Skip to first unread message

Glensimar Garcia

unread,
Dec 11, 2015, 1:49:14 PM12/11/15
to mapsforge-dev
Hi Guys!

I'm trying to create my own offline map but i would like to include seamarks on it,

Can anyone give me a hint to do this?


Emux

unread,
Dec 11, 2015, 1:58:09 PM12/11/15
to mapsfo...@googlegroups.com
You mean something like this ?

You can start from our guides here and here regarding map creation.

--
Emux

Glensimar Garcia

unread,
Dec 12, 2015, 6:35:44 AM12/12/15
to mapsforge-dev

Hi Emux!

I already have a downloaded map that works well, and overlay one layer with seamarks (buoys, beacon, etc.).Attached image. But sometimes the app gets very slow when loading the layer with the seamarks. So what wewant to do is generate a map with included seamarks, I read several posts but I could not do this.

Thanks for links..
FullSizeRender.jpg

Emux

unread,
Dec 12, 2015, 6:55:11 AM12/12/15
to mapsfo...@googlegroups.com
You can overlay items on a map with two ways:

- The first (as you already tried) is with overlays on a ready map
(see our OverlayMapViewer for examples)

If you have many items you better use a separate thread (e.g. AsyncTask) for handling them.


- The second way is building a new map with the items included in it.
For that you need to read our guides (like the two mentioned in previous post)
That way is faster in responsiveness, but you may loose some of the Overlay features, like touch listeners on each item.

Essentially for creating maps, we provide a plugin for Osmosis tool.
And you'll need to use a custom tag-mapping for declaring the extra layers in the map creation process.
And then modify accordingly the render theme to describe how your new layers are to be rendered.

I strongly suggest to start with our documentation.

--
Emux

Glensimar Garcia

unread,
Dec 14, 2015, 9:42:25 AM12/14/15
to mapsforge-dev
Thank you Emux.. 

Anything I let you know!!

Sebastian Dambeck

unread,
Dec 14, 2015, 12:11:38 PM12/14/15
to mapsforge-dev
Hey Emux


- The first (as you already tried) is with overlays on a ready map
(see our OverlayMapViewer for examples)

If you have many items you better use a separate thread (e.g. AsyncTask) for handling them.

interesting Idea to use a seperate Thread. Can you give me a hint whats the best way to do that?

Emux

unread,
Dec 14, 2015, 12:28:32 PM12/14/15
to mapsfo...@googlegroups.com
On 14/12/2015 07:11 μμ, Sebastian Dambeck wrote:
interesting Idea to use a seperate Thread. Can you give me a hint whats the best way to do that?

That depends on how you retrieve the data which you want to overlay on the map.

There can be various sources like from web services, from databases, from structured data (xml, gpx) and many many others.

The data organization - if long running - is recommended to not happen on main thread, in order to not "block" the application.

Specifically for AsyncTask, the data retrieval can be in doInBackground and the actual overlaying in onPostExecute.
See our PoiSearchViewer in Samples dev for an implementation example.

But Android background processing has more members, you can find guides online, e.g.
http://www.vogella.com/tutorials/AndroidBackgroundProcessing/article.html

--
Emux

Sebastian Dambeck

unread,
Dec 15, 2015, 4:58:15 AM12/15/15
to mapsforge-dev
As always Thanks a lot! I give a try

Glensimar Garcia

unread,
Dec 17, 2015, 6:02:05 PM12/17/15
to mapsforge-dev
Hi Emux!
Can you help me to fix this?

Unable to load plugin class (org.mapsforge.map.writer.osmosis.MapFileWriterPluginLoader)



I try this that i found in a previous post:

This has gone for me: 
1) copy 'mapsforge-map-0.3.0-jar-with-dependencies.jar' into 
'osmosis/lib/default' directory 
2) Create file 'osmosis-plugins.conf' into 'osmosis/config' directory 
3) Add this line to the file: 
org.mapsforge.map.writer.osmosis.MapFileWriterPluginLoader 

but i do not know if this works the same with the last mapsforge-map-writer-dev-SNAPSHOT.jar

Thanks..

Ludwig

unread,
Dec 17, 2015, 6:38:57 PM12/17/15
to mapsfo...@googlegroups.com
There is no change in this. 

If you follow the instructions closely, it will work.

--
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/5b6cbb4e-7ff2-484a-af2c-c0973e0311be%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Glensimar Garcia

unread,
Dec 17, 2015, 7:25:44 PM12/17/15
to mapsforge-dev
Ludwig..

I include another file for plugin and now i get this:

17/12/2015 06:59:56 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
GRAVE: Thread for task 1-rb failed
java.lang.OutOfMemoryError: Java heap space
    at gnu.trove.map.hash.TLongObjectHashMap.rehash(TLongObjectHashMap.java:158)
    at gnu.trove.impl.hash.THash.postInsertHook(THash.java:388)
    at gnu.trove.map.hash.TLongObjectHashMap.doPut(TLongObjectHashMap.java:248)
    at gnu.trove.map.hash.TLongObjectHashMap.put(TLongObjectHashMap.java:222)
    at org.mapsforge.map.writer.RAMTileBasedDataProcessor.addNode(RAMTileBasedDataProcessor.java:101)
    at org.mapsforge.map.writer.osmosis.MapFileWriterTask.process(MapFileWriterTask.java:162)
    at crosby.binary.osmosis.OsmosisBinaryParser.parseDense(OsmosisBinaryParser.java:139)
    at crosby.binary.BinaryParser.parse(BinaryParser.java:124)
    at crosby.binary.BinaryParser.handleBlock(BinaryParser.java:68)
    at crosby.binary.file.FileBlock.process(FileBlock.java:135)
    at crosby.binary.file.BlockInputStream.process(BlockInputStream.java:34)
    at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:37)
    at java.lang.Thread.run(Thread.java:662)
17/12/2015 06:59:56 PM org.openstreetmap.osmosis.core.Osmosis main
GRAVE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed.
    at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:146)
    at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)
    at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)

 I found some post where suggest use version for osmosis 0.40.1 but still the same.. Do you have any idea?

Thanks!



El viernes, 11 de diciembre de 2015, 14:19:14 (UTC-4:30), Glensimar Garcia escribió:

Glensimar Garcia

unread,
Dec 17, 2015, 7:26:32 PM12/17/15
to mapsforge-dev

Emux

unread,
Dec 18, 2015, 2:30:06 AM12/18/15
to mapsfo...@googlegroups.com
For using the map-writer plugin, we have detailed instructions in our docs.
(if you find any difficulties please inform us to improve them)

We recommend to download the latest map-writer plugin and use it with the latest Osmosis.

Those instructions you mentioned (I have written them in old times), now we are more flexible with the plugins. :)

About the OOM if you use the type=ram you need (depending on your map size) to give Osmosis more memory via the -Xmx option (based on your actual RAM).
Or you can try the type=hd for more safe but slow map building.

--
Emux

Ludwig

unread,
Dec 18, 2015, 2:56:00 AM12/18/15
to mapsfo...@googlegroups.com
It says your JVM is out of memory. We use quite a bit of memory making maps, increase memory with a option to the java command such like -Xmx8524M (depending on how much memory you have, the more the better), or use the -hd option (much slower).

Ludwig

--
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.

Glensimar Garcia

unread,
Dec 18, 2015, 3:46:32 PM12/18/15
to mapsforge-dev
Hi Guys!

i try this:

bin/osmosis --rb file=berlin.osm.pbf --mapfile-writer file=berlin.map --type=hd

and now i get:

Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Task type type=hd doesn't exist.

Emux

unread,
Dec 18, 2015, 3:52:28 PM12/18/15
to mapsfo...@googlegroups.com
The options of the --mapfile-writer don't have "--":  type=hd

--
Emux

Glensimar Garcia

unread,
Dec 20, 2015, 4:22:33 PM12/20/15
to mapsforge-dev
Yes.. Thanks!

Glensimar Garcia

unread,
Dec 23, 2015, 4:52:05 PM12/23/15
to mapsforge-dev
Hi Emux, Ludwig.

I try with the option hd and takes a long long time to process. But still at the end give me an error of Java heap space.

So i change computer with more memory and after doing the same i get this:

Pipeline executing, waiting for completion.

com.google.protobuf.InvalidProtocolBufferException: CodedInputStream encountered a malformed varint.

at com.google.protobuf.InvalidProtocolBufferException.malformedVarint(InvalidProtocolBufferException.java:84)

at com.google.protobuf.CodedInputStream.readRawVarint64SlowPath(CodedInputStream.java:784)

at com.google.protobuf.CodedInputStream.readRawVarint64(CodedInputStream.java:770)

at com.google.protobuf.CodedInputStream.readSInt64(CodedInputStream.java:590)

at org.openstreetmap.osmosis.osmbinary.Osmformat$DenseNodes.<init>(Osmformat.java:9269)

at org.openstreetmap.osmosis.osmbinary.Osmformat$DenseNodes.<init>(Osmformat.java:9172)

at org.openstreetmap.osmosis.osmbinary.Osmformat$DenseNodes$1.parsePartialFrom(Osmformat.java:9352)

at org.openstreetmap.osmosis.osmbinary.Osmformat$DenseNodes$1.parsePartialFrom(Osmformat.java:9347)

at com.google.protobuf.CodedInputStream.readMessage(CodedInputStream.java:495)

at org.openstreetmap.osmosis.osmbinary.Osmformat$PrimitiveGroup.<init>(Osmformat.java:3428)

at org.openstreetmap.osmosis.osmbinary.Osmformat$PrimitiveGroup.<init>(Osmformat.java:3368)

at org.openstreetmap.osmosis.osmbinary.Osmformat$PrimitiveGroup$1.parsePartialFrom(Osmformat.java:3496)

at org.openstreetmap.osmosis.osmbinary.Osmformat$PrimitiveGroup$1.parsePartialFrom(Osmformat.java:3491)

at com.google.protobuf.CodedInputStream.readMessage(CodedInputStream.java:495)

at org.openstreetmap.osmosis.osmbinary.Osmformat$PrimitiveBlock.<init>(Osmformat.java:2421)

at org.openstreetmap.osmosis.osmbinary.Osmformat$PrimitiveBlock.<init>(Osmformat.java:2356)

at org.openstreetmap.osmosis.osmbinary.Osmformat$PrimitiveBlock$1.parsePartialFrom(Osmformat.java:2471)

at org.openstreetmap.osmosis.osmbinary.Osmformat$PrimitiveBlock$1.parsePartialFrom(Osmformat.java:2466)

at com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:104)

at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:124)

at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:129)

at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49)

at org.openstreetmap.osmosis.osmbinary.Osmformat$PrimitiveBlock.parseFrom(Osmformat.java:2712)

at org.openstreetmap.osmosis.osmbinary.BinaryParser.handleBlock(BinaryParser.java:66)

at org.openstreetmap.osmosis.osmbinary.file.FileBlock.process(FileBlock.java:135)

at org.openstreetmap.osmosis.osmbinary.file.BlockInputStream.process(BlockInputStream.java:34)

at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:45)

at java.lang.Thread.run(Thread.java:745)


Thanks and Happy Holidays!


Emux

unread,
Dec 23, 2015, 5:02:37 PM12/23/15
to mapsfo...@googlegroups.com
The log shows pbf reading by Osmosis (a prior Mapsforge stage).

So are you using the latest Osmosis with unmodified its libraries (except adding map-writer plugin) ?

Are you using a custom pbf file and are you sure it's constructed correctly?

--
Emux

Ludwig

unread,
Dec 24, 2015, 12:31:56 AM12/24/15
to mapsfo...@googlegroups.com

Probably truncated file, check size

--
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,
Dec 24, 2015, 2:27:24 AM12/24/15
to mapsfo...@googlegroups.com
A test I would do, is processing the pbf without map-writer to see what actual happens with the input data.

e.g. convert the pbf to osm and see if the process finishes:
osmosis --rb input.pbf --wx output.osm

--
Emux

Glensimar Garcia

unread,
Dec 25, 2015, 8:04:55 AM12/25/15
to mapsforge-dev
Thanks!! :)

Glensimar Garcia

unread,
Dec 25, 2015, 8:05:30 AM12/25/15
to mapsforge-dev
Good Thank you!

I let you know..

Kasimir

unread,
Dec 31, 2015, 4:50:06 AM12/31/15
to mapsforge-dev
Hi Guys,
i upfollow this all and get a Map what only has under 1 MB at least after 7 Hours Waittime ;-(
i add both files here - Protocoll Output of Mapwriter Processing and the final File itself.

Has any of yours a Idea, what was wrong here ?

Final i wish you good Luck for the new Year !

Kasi


output.zip

Emux

unread,
Dec 31, 2015, 5:00:10 AM12/31/15
to mapsfo...@googlegroups.com
- Using a large pbf with hd, long process time is not strange

- Your bounding box seems wrong, it's somewhere east of Africa

--
Emux

Kasimir

unread,
Dec 31, 2015, 6:03:19 AM12/31/15
to mapsforge-dev
Hi Emux,
i use the bbox from Glensi Informations, where do i found correct Parameters for only Germany, then i think bbox was the Problem, right ?
regards Kasi

Emux

unread,
Dec 31, 2015, 6:10:09 AM12/31/15
to mapsfo...@googlegroups.com
You can find coordinates for any area in web maps on net, each has its own way.
e.g. if you're looking for cutting a specific area for a country.

Or search for tools like that: https://osm.wno-edv-service.de/boundaries/

Note: In map-creator we use poly files for more precise cutting with live bbox calculation.

Atlas also can give you coordinates info in its status bar or via right click on map.

--
Emux

Kasimir

unread,
Dec 31, 2015, 6:19:30 AM12/31/15
to mapsforge-dev
Found this now, do you think this is right ?
5.5590820312 - 15.0512695312 - 47.2046423888 - 54.9650016611

Kasi

Emux

unread,
Dec 31, 2015, 6:26:08 AM12/31/15
to mapsfo...@googlegroups.com
No, proper bounds can be seen in screenshot.

--
Emux
bounds.png

Emux

unread,
Dec 31, 2015, 6:30:18 AM12/31/15
to mapsfo...@googlegroups.com
Look after the proper order of coordinates as seen in docs:
minLat,minLon,maxLat,maxLon

--
Emux

Kasimir

unread,
Dec 31, 2015, 6:32:26 AM12/31/15
to mapsforge-dev
I have now download a Polyfile here, but how to input this into osmosis..

Normal i must input here the input file and the boundary box like this =
C:\osmosis\bin>osmosis --rb file=/osmosis/out.osm --mapfile-writer type=hd file=/osmosis/germany-1.map bbox=55.04061432771673,4.918701171875,47.52863469527167,14.350830078125 -Xmx16384M

i add out.osm, then say what is output file and final i add the Boundary Box, but if i want to use Polyline file - how is this to add ??
regards Sven

Kasimir

unread,
Dec 31, 2015, 6:48:16 AM12/31/15
to mapsforge-dev
If i use this, i get the follow Error =

C:\osmosis\bin>osmosis --rb file=/osmosis/out.osm --mapfile-writer type=hd file=/osmosis/germany-1.map --bounding-polygon file=/osmosis/germany.poly -Xmx16384M
Dez 31, 2015 12:46:59 PM org.openstreetmap.osmosis.core.Osmosis run
INFORMATION: Osmosis Version 0.44.1
Dez 31, 2015 12:47:00 PM org.openstreetmap.osmosis.core.Osmosis run
INFORMATION: Preparing pipeline.
Dez 31, 2015 12:47:00 PM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init>
INFORMATION: mapfile-writer version: mapsforge-map-writer-0.6.0
Dez 31, 2015 12:47:00 PM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init>
INFORMATION: mapfile format specification version: 3
Dez 31, 2015 12:47:00 PM org.openstreetmap.osmosis.core.Osmosis main
SCHWERWIEGEND: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: No default pipes are available as input for task 3-bounding-polygon.
        at org.openstreetmap.osmosis.core.pipeline.common.PipeTasks.retrieveTask(PipeTasks.java:150)
        at org.openstreetmap.osmosis.core.pipeline.common.TaskManager.getInputTask(TaskManager.java:165)
        at org.openstreetmap.osmosis.core.pipeline.v0_6.SinkSourceManager.connect(SinkSourceManager.java:51)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.connectTasks(Pipeline.java:74)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare(Pipeline.java:116)
        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(Launcher.java:330)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:47)

Emux

unread,
Dec 31, 2015, 6:49:51 AM12/31/15
to mapsfo...@googlegroups.com
Read our map-writer documentation.

We don't use poly files, just bounding box coordinates.

--
Emux

Kasimir

unread,
Dec 31, 2015, 7:04:57 AM12/31/15
to mapsforge-dev
O.K. i change back to bbox
but i have now check with a boundary tool - and get this back
left=5.7331 bottom=47.2949 right=15.0275 top=54.8899 - this are the coordinates for Germany
and nearly this i have input in the command line, but you say this is wrong parameter for south Africa in mapwriter ??

What is here wrong ?
i use yet bbox=5.7331,47.2949,15.0275,54.8899

Or is the input of mapwriter commandline different ??
left=5.7331 bottom=47.2949 right=15.0275 top=54.8899 ??

regards kasi

Emux

unread,
Dec 31, 2015, 7:08:43 AM12/31/15
to mapsfo...@googlegroups.com
left = minLon
bottom = minLat
right = maxLon
top = maxLat

And the command line is valid with:
bbox=minLat,minLon,maxLat,maxLon


Please (all of you) invest time to study our docs and their examples!

--
Emux

Kasimir

unread,
Dec 31, 2015, 7:20:24 AM12/31/15
to mapsforge-dev
Ahhhhhhrrrgggghhhhh...this was the Error by me...
O.K. Emux - thanks very much, now i can start the next try and hope in 8 Hours i get now a better result. The old Map was failed, by using wrong parameters..
I let you know if i was successful ;-)
kasi

P.S.
Have a nice Day and wish you all the best for the new Year ;-)

Kasimir

unread,
Jan 1, 2016, 11:21:02 AM1/1/16
to mapsforge-dev
Happy new Year to all

i have now successful generate a Map with 200 mb more datas and i can read the Map in a Offline Map reader, but

i see no Seamarks in this Map ??

After i think about this a while the Problem looks like, that the xml File have Coordinates and Positions and Colors, but there is no Graphic inside the Files.
So can it be, that the Map now have all Positions and what it need, but dont know how to generate the Graphics for this Positions ?

And also the next Question is, how to add Graphic into the Files - how does a Map insert the right Graphics from that second File Seamarks, what is to 100 % only a File, what says how to look and where to insert on a Map and also inwhat file it must have the Graphics for that?

I think, here is the Problem for not Viewing any Seamark - The Map itself is finished without big Errors.
If any what can help me here to understand, how a Graphic is inserting in a new Map - and how to modify Files ?

Regards Kasi

Emux

unread,
Jan 1, 2016, 11:27:44 AM1/1/16
to mapsfo...@googlegroups.com
- What goes in the map with the map-writer, is defined with the tag-mapping xml (see here).
If you don't define one then the default one is used.
If you have custom data then you need to have one describing your data (e.g. extending the default one).

- After the map creation you need an appropriate render theme xml (see here).
In it you declare rules for how the map will be rendered on the screen.
Apparently your custom data will need additional rules too.

See our aforementioned documentation and the accompanied xmls to understand their meaning and use.

--
Emux

Glensimar Garcia

unread,
Jan 4, 2016, 2:49:27 PM1/4/16
to mapsforge-dev
Hi Emux!

So.. We have to modify the tag-mapping xml inside the plugin to add my custom tags? 

And then generate again the map with osmosis?

Because i have the new rules for rendertheme, but not show anything i supposed that is because i did not have a custom xml file. 

(Ahh!  how can i include tag-mapping.xml do it without errors? Because I have read that if I change the contents of a .jar file may be damaged.)

Thanks!

Emux

unread,
Jan 4, 2016, 2:55:36 PM1/4/16
to mapsfo...@googlegroups.com
You don't need to modify the default tag-mapping.
Just pass your custom one's path via the 'tag-conf-file' option.

See our documentation for details.

--
Emux

Gina

unread,
Jan 5, 2016, 5:49:09 AM1/5/16
to mapsforge-dev
Hi,
we use this tag-conf-file but got this result

C:\osmosis\bin>osmosis --rb file=/osmosis/out.osm --mapfile-writer type=hd file=/osmosis/germany-2.map --tag-conf-file=/osmosis/tag-mapping.xml bbox=47.2949,5.7331,54.8899,15.0275 -Xmx16384
Jan 05, 2016 11:43:56 AM org.openstreetmap.osmosis.core.Osmosis run
INFORMATION: Osmosis Version 0.44.1
Jan 05, 2016 11:43:56 AM org.openstreetmap.osmosis.core.Osmosis run
INFORMATION: Preparing pipeline.
Jan 05, 2016 11:43:56 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init>
INFORMATION: mapfile-writer version: mapsforge-map-writer-0.6.0
Jan 05, 2016 11:43:56 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init>

INFORMATION: mapfile format specification version: 3
Jan 05, 2016 11:43:56 AM org.openstreetmap.osmosis.core.Osmosis main
SCHWERWIEGEND: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Task type tag-conf-file=/osmosis/tag-mapping.xml doesn't exist.
        at org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactoryRegister.getInstance(TaskManagerFactoryRegister.java:60)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.buildTasks(Pipeline.java:50)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare(Pipeline.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(Launcher.java:330)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:47)

file is in same dir, but looks like something is wrong ?
Gina

Emux

unread,
Jan 5, 2016, 5:53:55 AM1/5/16
to mapsfo...@googlegroups.com
tag-conf-file is an option for map-writer task, not an Osmosis task by itself.

So it does not need the '--' prefix, you can write it like the other options (type, file, etc.):
tag-conf-file=...

--
Emux

Gina

unread,
Jan 5, 2016, 5:58:17 AM1/5/16
to mapsforge-dev
Oops, have found self the Problem - the right Syntax is

osmosis --rb file=/osmosis/out.osm --mapfile-writer type=hd file=/osmosis/germany-2.map tag-conf-file=/osmosis/tag-mapping.xml bbox=47.2949,5.7331,54.8899,15.0275 -Xmx16384

thx Gina

Kasimir

unread,
Jan 7, 2016, 10:42:26 AM1/7/16
to mapsforge-dev
Hi Folks
Yepp we got it now..
We are now on the Way to include the right Tags for the Renderfile.
Thanks to EMUX and Ludwig from Team here - this  was very helpful and most of Errors we get by own stupid trys and misunderstandings.

Now we have done the first Map.. Thanks for it

Kasi

Emux

unread,
Jan 7, 2016, 12:09:11 PM1/7/16
to mapsfo...@googlegroups.com
If you find areas in our documentation that need better explanation,
please inform us to improve them for all new users benefit.

--
Emux

Glensimar Garcia

unread,
Jan 8, 2016, 11:11:52 AM1/8/16
to mapsforge-dev
Hi Emux, Ludwig!

Thanks for the help! :)

We are creating our tag-mapping to include the seamarks that we want in our map..

I have this in my seamark file:

<node id="824651056" lat="53.8846189" lon="13.8685188" version="3" timestamp="2014-07-13T23:52:21Z" changeset="24130810" uid="597190" user="Krille von Stralau">
    <tag k="buoy" v="lateral_port"/>
    <tag k="buoy:colour" v="red"/>
    <tag k="name" v="PN 90"/>
    <tag k="seamark" v="buoy"/>
    <tag k="seamark:buoy_lateral:category" v="port"/>
    <tag k="seamark:buoy_lateral:colour" v="red"/>
    <tag k="seamark:buoy_lateral:shape" v="pillar"/>
    <tag k="seamark:buoy_lateral:system" v="iala-a"/>
    <tag k="seamark:name" v="PN 90"/>
    <tag k="seamark:type" v="buoy_lateral"/>
  </node>

And i want to know if i include this:

 <osm-tag key="seamark:type" value="buoy_lateral" zoom-appear="10" />

Do I have to be specific in what buoy:shapes or color we want ? or tag-mapping include all nodes that have the seamark:type = bouy lateral?

because tag-mapping is becoming in a laaarge file..

And the same for all type of nodes? 

I hope explain myself.

Thanks!

Emux

unread,
Jan 8, 2016, 12:44:04 PM1/8/16
to mapsfo...@googlegroups.com
I'm afraid there are specific official OSM tags that are included automatically and recognized from render themes:

For nodes are:
name
addr:housenumber
ele

For ways are:
name
addr:housenumber
ref

So in your case you can declare in the tag-mapping the node types and in render theme refer to each type with its own symbol / color.

e.g. see how we declare the amenities in tag-mapping and in render theme.

--
Emux

Glensimar Garcia

unread,
Jan 8, 2016, 1:30:06 PM1/8/16
to mapsforge-dev
Oh Ok!.

And, for example, how can i do if my seamarks file is some like this:

<tag k="seamark:type" v="distance_mark"/>
<tag k="seamark:distance_mark:units" v="kilometres"/>
<tag k="seamark:distance_mark:units" v="kilometer"/>
<tag k="seamark:distance_mark:units" v="km"/>

Do I have to declare all three possible values? There is a wildcard for this cases ?

:)

Emux

unread,
Jan 8, 2016, 1:42:24 PM1/8/16
to mapsfo...@googlegroups.com
If I understand correctly you want to render a layer based on more than one tags.

Like the road network, which is composed of tags: highway, access, oneway, etc.

I suggest to see how we declare it in tag-mapping:
Here for main tag and here for it's additional tags (access, oneway, etc).

Then in render theme the tags can be combined like around here.

BTW I don't quite understand what you want to do with the units in tag-mapping.
I suggest to first define in its "simplest" form how you want to render the nodes and then proceed with the tag-mapping / render theme writing.
e.g. is it all about nodes with different symbol based on tag's values?

--
Emux

Glensimar Garcia

unread,
Jan 8, 2016, 1:57:05 PM1/8/16
to mapsforge-dev
Yes Emux.. I'm doing main tags and additional tags.

My question is if exist any wildcard to those tags that can contain multiples or different values... 

Distance marks is an example.

Thanks.. :)

Emux

unread,
Jan 8, 2016, 2:06:01 PM1/8/16
to mapsfo...@googlegroups.com
On 08/01/2016 08:57 μμ, Glensimar Garcia wrote:
My question is if exist any wildcard to those tags that can contain multiples or different values...

No, in tag-mapping we have to declare all tag values that are to be included in the map file.

I know it's not convenient..
And actually built marine maps with several thousands of lines for this purpose only :)

It would be good if we could use wildcards and number calculations in tagging (like in CartoCSS).
e.g. to include the elements with depth > 500m

Nevertheless in render theme you can use wildcards (see here).

--
Emux
Reply all
Reply to author
Forward
0 new messages