Commit: r1294: Added duplicate() method.

Version 1294 was commited by markb on 2009-10-18 21:56:03 +0100 (Sun, 18 Oct 2009) Added duplicate() method. Makes a new way that has the same values (id, name, tags, points) but differs in that the points list is a shallow copy of the original so that subsequent changes to the structure of the original points list don't cause the points list in the duplicate to change (of course, the points themselves could be changed).

svn commit schrieb:
Added duplicate() method.
Makes a new way that has the same values (id, name, tags, points) but differs in that the points list is a shallow copy of the original so that subsequent changes to the structure of the original points list don't cause the points list in the duplicate to change (of course, the points themselves could be changed).
Do you have an example, how this feature can be used? What use do you see for it? (This was propably answered in another thread, but I have missed the reasoning.) Gruss Torsten

Hi Torsten,
Do you have an example, how this feature can be used?
What use do you see for it? (This was propably answered in another thread, but I have missed the reasoning.)
It was added to solve a problem that Felix discovered when creating multiple lines/roads from a single way (using the continue patch). This was discussed at some length yesterday. Hopefully, the maintainer of the continue patch will update the patch to include the necessary usage of duplicate(). Cheers, Mark

Mark Burton schrieb:
It was added to solve a problem that Felix discovered when creating multiple lines/roads from a single way (using the continue patch). This was discussed at some length yesterday.
Hopefully, the maintainer of the continue patch will update the patch to include the necessary usage of duplicate().
Ah, now I understand. I thought your patch would add a duplicate-action-rule. I think the multiple_garmin_elements patch is based on a change introduced by myself. In my opinion this patch shouldn't be extended anymore, since I didn't understand the processing completely when I introduced the change. The style-branch is not perfect yet, but it is the much better approach for the problem. So the corresponding work should be concentrated on fixing and extending the style-branch instead. Gruss Torsten

Torsten Leistikow schrieb:
svn commit schrieb:
Added duplicate() method.
Makes a new way that has the same values (id, name, tags, points) but differs in that the points list is a shallow copy of the original so that subsequent changes to the structure of the original points list don't cause the points list in the duplicate to change (of course, the points themselves could be changed).
Do you have an example, how this feature can be used?
What use do you see for it? (This was propably answered in another thread, but I have missed the reasoning.)
An possible use will be in the douglas peucker filter, previously I had to copy the list of points by hand, before I modify it.
participants (4)
-
Johann Gail
-
Mark Burton
-
svn commit
-
Torsten Leistikow