[OSM-talk] JOSM Plugin-Manager was: JOSM "simplify way" option
Christof Dallermassl
cdaller.hw at gmx.at
Mon May 21 08:46:35 BST 2007
Hi!
are you adding all those new cool features as part of JOSM or as
plugins? I'd prefered them as plugins, but I see the problem of
distributing a large number of plugins.
What we need is a plugin manager with an (automatic) update mechanism,
like JEdit has. I had a look to the jedit code, but there's a lot of
stuff we need to adapt, but there's also a lot we can reuse. But it's
not a copy/paste adaptation. The main class is
org.gjt.sp.jedit.pluginmgr.PluginManager so if anybody wants to have a
look ...
What it does: load an xml file that contains all the plugin
descriptions, versions and dependencies from a server and compare to the
currently installed plugins.
So what is basically completely missing in our plugin architectur is
versions and dependencies.
I also thought about using the plugin architecture of eclipse, which
gives you all of these things for free. Anyone here knowing more about this?
regards
christof
Frederik Ramm schrieb:
> Hi,
>
> there's a lot of auto-imported data that looks ugly - I saw a lot of
> "staircase coastlines" somewhere in Asia, and have also encountered
> roads that were obviously created directly from a GPS tracklog without
> any simplification.
>
> While these should ideally be avoided on import, it would be nice to
> have some support in dealing with those that are there. I have added an
> (experimental) "simplify way" function to JOSM; if you want to try it
> out, you have to download this version:
>
> http://www.remote.org/frederik/tmp/josm-with-simplify.jar
>
> I have nicked the algorithm used by gpsbabel when it is called with the
> "-x simplify,error=xxx" option. What this does is essentially compute
> the "cross track error" that would be introduced by removing a node from
> the way (see pic), and remove the node it if the error is less than the
> given threshold.
>
> In this play version, the default for the allowed error is 0.06 in
> whatever units, I think it must be statue miles ;-) (that's what you get
> when you copy code without properly understanding it). This is good for
> fixing staircase coastlines, but will probably break detailed city
> mapping, you'll have to use something closer to 0.0002 for that I guess.
> It can be changed in the preferences option "simplify-way.max-error".
>
> The method only removes nodes (and segments), it never moves nodes. It
> also never removes the first node or last node in a way, nor does it
> remove a node tagged other than "created_by" and "source", and it also
> never removes nodes or segments used by other objects. It isn't very
> talkative at the moment so if you select a way and click simplify and
> nothing happens, maybe the way just isn't simplifiable. A production
> version of this would of course have to talk more, and probably ask for
> the desired maximum error each time it is executed.
>
> gpsbabel supports other methods of simplifying a way: it can look at
> segment lengths instead of cross-track errors, and it can also (instead
> of removing everything that falls below a certain threshold) remove a
> certain number of nodes. This might actually be nice to have in JOSM -
> make the simplify function always remove the 20% of the way's nodes that
> introduce the smallest error, and you can then repeat this until you are
> happy.
>
> Maybe others have experimented with way simplification and want to offer
> different algorithms? I'd also be interested in user reports, so if you
> know of some nasty ways in your area, give the above .jar a try and tell
> me if it is any good.
>
> Bye
> Frederik
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
--
---------------------------------------------------------------------------
Christof Dallermassl
christof at dallermassl.at
---------------------------------------------------------------------------
More information about the talk
mailing list