Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ups, forgot to increment loop index

  • Loading branch information...
commit 2c96104cbec86c2233acb6f51cce3882e4e8081a 1 parent 200bbbf
@olejorgenb authored
View
1  src/org/openstreetmap/josm/plugins/parallelway/ParallelWayMode.java
@@ -525,6 +525,7 @@ private boolean initParallelWays(Point p, boolean copyTags) {
referenceWayIndex = i;
break;
}
+ i++;
}
pWays = new ParallelWays(sourceWays, copyTags, referenceWayIndex);
pWays.commit();
View
5 src/org/openstreetmap/josm/plugins/parallelway/ParallelWays.java
@@ -36,6 +36,7 @@ public ParallelWays(Collection<Way> sourceWays, boolean copyTags, int refWayInde
// Possible/sensible to use PrimetiveDeepCopy here?
//// Make a deep copy of the ways, keeping the copied ways connected
+ // TODO: This assumes the first/last nodes of the ways are the only possible shared nodes.
HashMap<Node, Node> splitNodeMap = new HashMap<Node, Node>(sourceWays.size());
for (Way w : sourceWays) {
if (!splitNodeMap.containsKey(w.firstNode())) {
@@ -114,6 +115,10 @@ public boolean isClosedPath() {
return sortedNodes.get(0) == sortedNodes.get(sortedNodes.size() - 1);
}
+ /**
+ * Offsets the way(s) d units. Positive d means to the left (relative to the reference way)
+ * @param d
+ */
public void changeOffset(double d) {
//// This is the core algorithm:
/* 1. Calculate a parallel line, offset by 'd', to each segment in

0 comments on commit 2c96104

Please sign in to comment.
Something went wrong with that request. Please try again.