Permalink
Browse files

Ups, forgot to increment loop index

  • Loading branch information...
1 parent 200bbbf commit 2c96104cbec86c2233acb6f51cce3882e4e8081a @olejorgenb committed Jun 8, 2011
@@ -525,6 +525,7 @@ private boolean initParallelWays(Point p, boolean copyTags) {
referenceWayIndex = i;
break;
}
+ i++;
}
pWays = new ParallelWays(sourceWays, copyTags, referenceWayIndex);
pWays.commit();
@@ -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.