Changeset 6296 in josm for trunk/src/org/openstreetmap/josm/data/osm
- Timestamp:
- 2013-10-04T03:27:01+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
r6069 r6296 80 80 protected void mergePrimitive(OsmPrimitive source, Collection<? extends OsmPrimitive> candidates) { 81 81 if (!source.isNew() ) { 82 // try to merge onto a matching primitive with the same 83 // defined id 82 // try to merge onto a matching primitive with the same defined id 84 83 // 85 84 if (mergeById(source)) 86 85 return; 87 //if (!source.isVisible())88 // ignore it89 // return;90 86 } else { 91 87 // ignore deleted primitives from source … … 101 97 if (target.hasEqualSemanticAttributes(source)) { 102 98 mergedMap.put(source.getPrimitiveId(), target.getPrimitiveId()); 103 // copy the technical attributes from other 104 // version 99 // copy the technical attributes from other version 105 100 target.setVisible(source.isVisible()); 106 101 target.setUser(source.getUser()); -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r6248 r6296 1127 1127 if (!isNew() && id != other.id) 1128 1128 return false; 1129 // if (isIncomplete() && ! other.isIncomplete() || !isIncomplete() && other.isIncomplete())1130 1129 if (isIncomplete() ^ other.isIncomplete()) // exclusive or operator for performance (see #7159) 1131 1130 return false; -
trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
r6235 r6296 506 506 QBLevel<T> next; 507 507 next = q.nextContentNode(); 508 //if (consistency_testing && (orig == next))509 508 if (orig == next) { 510 509 abort("got same leaf back leaf: " + q.isLeaf()); -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java
r6084 r6296 249 249 // equal semantics is valid for subclasses like {@link HistoryOsmNode} etc. too. 250 250 // So, don't enforce equality of class. 251 //252 // if (getClass() != obj.getClass())253 // return false;254 251 HistoryOsmPrimitive other = (HistoryOsmPrimitive) obj; 255 252 if (id != other.id) -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r6248 r6296 498 498 } else { 499 499 TexturePaint texture = new TexturePaint(fillImage.getImage(), 500 // new Rectangle(polygon.xpoints[0], polygon.ypoints[0], fillImage.getWidth(), fillImage.getHeight()));501 500 new Rectangle(0, 0, fillImage.getWidth(), fillImage.getHeight())); 502 501 g.setPaint(texture); … … 511 510 512 511 if (text != null && isShowNames()) { 513 /* 514 * abort if we can't compose the label to be rendered 515 */ 512 // abort if we can't compose the label to be rendered 516 513 if (text.labelCompositionStrategy == null) return; 517 514 String name = text.labelCompositionStrategy.compose(osm); … … 522 519 Rectangle2D nb = fontMetrics.getStringBounds(name, g); // if slow, approximate by strlen()*maxcharbounds(font) 523 520 524 // Point2D c = getCentroid(polygon);525 521 // Using the Centroid is Nicer for buildings like: +--------+ 526 522 // but this needs to be fast. As most houses are | 42 | … … 528 524 // will have to do. ++ 529 525 // Centroids are not optimal either, just imagine a U-shaped house. 530 // Point2D c = new Point2D.Double(pb.x + pb.width / 2.0, pb.y + pb.height / 2.0);531 // Rectangle2D.Double centeredNBounds =532 // new Rectangle2D.Double(c.getX() - nb.getWidth()/2,533 // c.getY() - nb.getHeight()/2,534 // nb.getWidth(),535 // nb.getHeight());536 526 537 527 Rectangle centeredNBounds = new Rectangle(pb.x + (int)((pb.width - nb.getWidth())/2.0), -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java
r6248 r6296 488 488 } 489 489 } 490 } /* for(i = ... */491 } /* while(joined) */490 } 491 } 492 492 493 493 if (nodes == null) { … … 497 497 498 498 result.add(new JoinedWay(nodes, wayIds, selected)); 499 } /* while(left != 0) */499 } 500 500 501 501 return result; … … 575 575 return innerWays; 576 576 } 577 /* 578 public List<PolyData> getInnerPolygons() { 579 return innerPolygons; 580 } 581 582 public List<PolyData> getOuterPolygons() { 583 return outerPolygons; 584 } 585 */ 577 586 578 public List<PolyData> getCombinedPolygons() { 587 579 return combinedPolygons;
Note:
See TracChangeset
for help on using the changeset viewer.