Changeset 29050 in osm for applications
- Timestamp:
- 2012-12-07T13:29:50+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java
r29047 r29050 399 399 } 400 400 401 addressBuilding(terr, street, streetName, number, additionalKeys );401 addressBuilding(terr, street, streetName, number, additionalKeys, associatedStreet); 402 402 403 403 ways.add(terr); … … 429 429 } 430 430 } 431 addressBuilding(outline, street, streetName, number, null );431 addressBuilding(outline, street, streetName, number, null, associatedStreet); 432 432 ways.add(outline); 433 433 } … … 487 487 * @param number The house number 488 488 * @param additionalKeys More keys to be copied onto the new outline 489 * @param associatedStreet The associated street. Used to determine if addr:street should be set or not. 489 490 */ 490 491 private void addressBuilding(Way outline, Way street, String streetName, 491 String number, Set<Entry<String, String>> additionalKeys ) {492 String number, Set<Entry<String, String>> additionalKeys, Relation associatedStreet) { 492 493 if (number != null) { 493 494 // only, if the user has specified house numbers … … 507 508 this.commands.add(new ChangePropertyCommand(outline, "building", "yes")); 508 509 } 509 if (street != null) { 510 this.commands.add(new ChangePropertyCommand(outline, "addr:street", street.get("name"))); 511 } else if (streetName != null && !streetName.trim().isEmpty()) { 512 this.commands.add(new ChangePropertyCommand(outline, "addr:street", streetName.trim())); 510 // Only put addr:street if no relation exists or if it has no name 511 if (associatedStreet == null || !associatedStreet.hasKey("name")) { 512 if (street != null) { 513 this.commands.add(new ChangePropertyCommand(outline, "addr:street", street.get("name"))); 514 } else if (streetName != null && !streetName.trim().isEmpty()) { 515 this.commands.add(new ChangePropertyCommand(outline, "addr:street", streetName.trim())); 516 } 513 517 } 514 518 }
Note:
See TracChangeset
for help on using the changeset viewer.