#14 closed enhancement (fixed)
Simplify way mode
Reported by: | imi | Owned by: | framm |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | unspecified | Version: | |
Keywords: | Cc: | rmack@… |
Description
Simplify a way by specifying a accuracy threshold (e.g. "95% accuracy"). JOSM will remove nodes from the way until its minimum squared error reaces the threshold.
Attachments (0)
Change History (4)
comment:1 by , 18 years ago
Owner: | changed from | to
---|
comment:2 by , 18 years ago
Cc: | added |
---|
nice feature. Thanks. A few thoughts:
default max-error seems to be very high, I suggest 0.02 (instead of 0.06, 0.6 seems to be a typo anyway)
after deleting a node, wouldn't it improve the overall error if the next node in each direction is moved towards the deleted one?
it didn't work for all ways for me, e. g. in motorway A3 near Zurich (way containing node 455357 47.2741661071777, 8.56744480133057) it did not remove anything, although it's nearly straight and therefore should remove quite a few nodes (or did I miss the point completely?)
follow-up: 4 comment:3 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I had chosen 0.6 initially because I experimented with "staircase-like" coastline in Asia that was imported from very low-resolution data; to eliminate these stairs I needed such a high value.
You're right about moving nodes but the gpsbabel code I used didn't do that and I was not adventurous enough to play with that.
It didn't work for your motorway because the nodes of that motorway are tagged with "ele" and "time", and it will never touch a node that has anything other than "created_by" and "source". The list of "tags that may be removed" should probably be increased but there has to be such a list because we would never want to e.g. remove a "railway=halt" type of node from a railway line.
I have sent the source code for this feature to Thomas Walraet who will incorporate it into the "Utils" plugin, so I'll close the ticket here.
comment:4 by , 18 years ago
I have sent the source code for this feature to Thomas Walraet who will incorporate it into the "Utils" plugin
I think I mixed up names here. My "sent mail" folder says I sent it to Martijn van Oosterhout.
A "simplify way" function has been added in a preview that is not yet commited to SVN:
http://www.remote.org/frederik/tmp/josm-with-simplify.jar
This mimicks the behaviour of gpsbabel with the "simplify" filter. The max. error can be specified through the "simplify-way.max-error" preferences value (default 0.6).
Might be introduced to SVN pending some user comments.