source:
osm/applications/editors/josm/plugins/czechaddress/conscriptionnumber.patch@
16630
| Last change on this file since 16630 was 16617, checked in by , 16 years ago | |
|---|---|
| File size: 2.8 KB | |
-
src/org/openstreetmap/josm/plugins/czechaddress/PrimUtils.java
13 13 public static final String KEY_HIGHWAY = "highway"; 14 14 public static final String KEY_PLACE = "place"; 15 15 16 public static final String KEY_ADDR_CP = "addr:alternatenumber"; 17 public static final String KEY_ADDR_CO = "addr:housenumber"; 16 public static final String KEY_ADDR_CP = "addr:conscriptionnumber"; 17 public static final String KEY_ADDR_CO = "addr:streetnumber"; 18 public static final String KEY_ADDR_HOUSE_N = "addr:housenumber"; 18 19 public static final String KEY_ADDR_STREET = "addr:street"; 19 20 public static final String KEY_ADDR_CITY = "addr:city"; 20 21 public static final String KEY_ADDR_COUNTRY = "addr:country"; -
src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/House.java
92 92 */ 93 93 public static String generateName(String cp, String co) { 94 94 95 if ( (cp != null) && (co != null))96 return cp + "/" + co;97 98 if (co != null) return co;99 if (cp != null) return cp;100 101 assert false;102 return ""; // <-- just to make compiler happy.95 if (co == null) 96 return cp; 97 else { 98 if (cp == null) 99 return "?/"+co; 100 else 101 return cp+"/"+co; 102 } 103 103 } 104 104 105 105 /** … … 152 152 */ 153 153 @Override 154 154 protected int[] getFieldMatchList(OsmPrimitive prim) { 155 int[] result = {0, 0 };155 int[] result = {0, 0, 0}; 156 156 if (!isMatchable(prim)) return result; 157 157 158 158 // First field is the AlternateNubmer 159 159 result[0] = matchField(this.cp, prim.get(PrimUtils.KEY_ADDR_CP)); 160 result[2] = matchField(name, prim.get(PrimUtils.KEY_ADDR_HOUSE_N)); 160 161 161 162 // Second field is the Housenumber 162 163 if (parent instanceof Street) … … 190 191 List<Proposal> props = new NotNullList<Proposal>(); 191 192 ParentResolver resolver = new ParentResolver(this); 192 193 194 props.add(getStringFieldDiff(PrimUtils.KEY_ADDR_HOUSE_N, prim.get(PrimUtils.KEY_ADDR_HOUSE_N), name)); 195 193 196 props.add(getStringFieldDiff(PrimUtils.KEY_ADDR_CP, prim.get(PrimUtils.KEY_ADDR_CP), getCP())); 194 197 props.add(getStringFieldDiff(PrimUtils.KEY_ADDR_CO, prim.get(PrimUtils.KEY_ADDR_CO), getCO())); 195 198
Note:
See TracBrowser
for help on using the repository browser.
