Closed qB0t closed 9 months ago
Hi @qB0t,
the mapwriter plugin does not come with the osmosis installation.
It is downloaded during usage of wahooMapsCreator and saved in path:
/Users/<username>/.openstreetmap/osmosis/plugins
mapsforge-map-writer-0.18.0-jar-with-dependencies.jar
. Maybe this is a authorization issue.pip show wahoomc
python -m wahoomc cli -co malta -v
I have been thinking if one should replace the osmosis with rather using osmium merge for this as well. It seems we are using osmium for most of the steps. And although I really like Java, it would allow us to just use one tool, and also not requiring the Java to be installed and the separate plugin to be downloaded.
I have not actually tried the osmium merge, but it is on my todo list. I also saw that there is a "tag replace" functionality as part of osmium, although it requires a separate tool from the same author as osmium. At least it would be fun to try manually if the osmium merge produces the same results as omsosis.
@treee111, I also wonder if it has been considered before to replace osmosis ? It seems to be in "maintenance mode", with no new features being added. So the osmium seems like a better long term solution as well.
I think a long time ago I concentrated on using fewer and the same tools on both (main) supported OS: macOS and Windows. You are right, at the moment there are still some tools used and different installation methods for both OS (and maybe also different tools when looking into very detail).
If I remember correct, writing map files using the mapwriter plugin was one thing not easy to replace.
If the results are the same (unittests) or at least very near on both OS, I have no problem switching tools. Apart from performance I have no features on the roadmap and in combination with limited time at the moment wahooMapsCreator is mainly in maintenance mode.
Thank you for your contributions to keep the lights on and have some codechanges 👍
I've had the same issue with mapsforge-map-writer plugin not being loaded by osmosis, although the plugin file exists. I've managed to solve this issue by downgrading osmosis to version 0.47, which works. I've uninstalled the brew version, downloaded the older one from http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-0.47.tgz, unpacked and added the bin folder to $PATH and the wahooMapsCreator runs successfully.
I see they've removed plugin support from osmosis 0.49.
From changelog https://github.com/openstreetmap/osmosis/releases for 0.49.0: Remove Java Plugin Framework support (standard Osmosis plugin support remains).
And mapsforge-map-writer was one of those plugins.
Not familiar with the two plugin concepts, but I see https://github.com/mapsforge/mapsforge/blob/master/mapsforge-map-writer/src/main/config/osmosis-plugins.conf and this commit https://github.com/openstreetmap/osmosis/commit/95a380b3724159965cc0535116057d30e42d65ff
Osmosis has two ways of registering plugins, the method used by all
in-built tasks (i.e. search for osmosis-plugins.conf files) and a JPF
(Java Plugin Framework) method. The JPF mechanism was added before
Osmosis had any other concept of plugins but has became redundant when
Osmosis was refactored into many Java modules and developed its own
plugin mechanism. The JPF approach may have some advantages around
classloader separation but it's very complicated and hard to understand.
This change simplifies the Osmosis startup process considerably.
So to me, it seems like the mapwrite plugin would still be supported
Hi all, thanks for digging into this! You are right, the way of installing the Map Writer plugin like written in the docs is not valid anymore. I was able to reproduce on my device and opened a issue to get to know the way of correctly registering plugins in osmosis v0.49.0: https://github.com/openstreetmap/osmosis/issues/140. I'll try out on my device if I get it to work with help of the internet.
a little update on this issue:
as a hack (and how other integrated plugins work), this has been tested by some people and works:
libexec/plugins
libexec/osmosis
at the end of the line: :$APP_HOME/plugins/*
@alfh made good progress of reverting the removal of JPF. It seams that osmosis team will have the JPF feature back in a later release and means that the implementation Mapwriter plugin in wahooMapsCreator can stay as-is. Hence we will not dig into getting the hack or any other way implemented.
Followed all the instructions for Mac OS, tried creating a map for Cyrpus (only one country) and got this:
Was unable to install any other version of osmosis than the current 0.49.0 that comes with brew.