Modify

Ticket #14 (closed enhancement: fixed)

Opened 6 years ago

Last modified 3 years ago

Simplify way mode

Reported by: imi Owned by: framm
Priority: minor 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

Change History

comment:1 Changed 5 years ago by framm

  • Owner changed from imi to framm

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.

comment:2 Changed 5 years ago by ramack

  • Cc rmack@… 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?)

comment:3 follow-up: ↓ 4 Changed 5 years ago by framm

  • Status changed from new to closed
  • Resolution set to fixed

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 in reply to: ↑ 3 Changed 5 years ago by anonymous

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.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.