- Timestamp:
- 2016-02-02T23:01:02+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Relation.java
r9460 r9716 420 420 @Override 421 421 public OsmPrimitiveType getDisplayType() { 422 return isMultipolygon() ? OsmPrimitiveType.MULTIPOLYGON 423 : OsmPrimitiveType.RELATION; 424 } 425 422 return isMultipolygon() && !isBoundary() ? OsmPrimitiveType.MULTIPOLYGON : OsmPrimitiveType.RELATION; 423 } 424 425 /** 426 * Determines if this relation is a boundary. 427 * @return {@code true} if a boundary relation 428 */ 429 public boolean isBoundary() { 430 return "boundary".equals(get("type")); 431 } 432 433 /** 434 * Determines if this relation behaves as a multipolygon. 435 * @return {@code true} if it's a real mutlipolygon or a boundary relation 436 */ 426 437 public boolean isMultipolygon() { 427 return "multipolygon".equals(get("type")) || "boundary".equals(get("type"));438 return "multipolygon".equals(get("type")) || isBoundary(); 428 439 } 429 440
Note:
See TracChangeset
for help on using the changeset viewer.