Changeset 30334 in osm for applications/editors/josm/plugins/pointInfo/src/org
- Timestamp:
- 2014-03-20T21:59:08+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/PointInfoAction.java
r30328 r30334 74 74 @Override 75 75 public void enterMode() { 76 System.out.println("enterMode() - start");77 76 if (!isEnabled()) { 78 77 return; … … 81 80 Main.map.mapView.setCursor(getCursor()); 82 81 Main.map.mapView.addMouseListener(this); 83 System.out.println("enterMode() - end");84 82 85 83 } … … 87 85 @Override 88 86 public void exitMode() { 89 System.out.println("exitMode() - start");90 87 super.exitMode(); 91 88 Main.map.mapView.removeMouseListener(this); 92 System.out.println("exitMode() - end");93 89 } 94 90 -
applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/ruianModule.java
r30328 r30334 201 201 private int m_objekt_byty; 202 202 private String m_objekt_zpusob_vyuziti; 203 private String m_objekt_zpusob_vyuziti_kod; 203 204 private String m_objekt_zpusob_vyuziti_key; 204 205 private String m_objekt_zpusob_vyuziti_val; … … 245 246 m_objekt_byty = 0; 246 247 m_objekt_zpusob_vyuziti = ""; 248 m_objekt_zpusob_vyuziti_kod = ""; 247 249 m_objekt_zpusob_vyuziti_key = ""; 248 250 m_objekt_zpusob_vyuziti_val = ""; … … 317 319 try { 318 320 m_objekt_zpusob_vyuziti = stavebniObjekt.getString("zpusob_vyuziti"); 321 } catch (Exception e) { 322 } 323 324 try { 325 m_objekt_zpusob_vyuziti_kod = stavebniObjekt.getString("zpusob_vyuziti_kod"); 319 326 } catch (Exception e) { 320 327 } … … 523 530 r.append("<br/>"); 524 531 if (m_objekt_ruian_id > 0) { 525 r.append("<i><u>Informace o objektu</u></i>");532 r.append("<i><u>Informace o budově</u></i>"); 526 533 r.append(" <a href=file://tags.copy/building><img src="+getClass().getResource("/images/dialogs/copy-tags.png")+" border=0 alt=\"Vložit tagy do schránky\" ></a><br/>"); 527 534 r.append("<b>RUIAN id: </b><a href=http://vdp.cuzk.cz/vdp/ruian/stavebniobjekty/" + m_objekt_ruian_id +">" + m_objekt_ruian_id + "</a><br/>"); … … 678 685 679 686 /** 687 * Convert date from Czech to OSM format 688 * @param ruianDate Date in RUIAN (Czech) format DD.MM.YYYY 689 * @return String with date converted to OSM data format YYYY-MM-DD 690 */ 691 String convertDate (String ruianDate) { 692 String r = new String(); 693 String[] parts = ruianDate.split("\\."); 694 try { 695 int day = Integer.parseInt(parts[0]); 696 int month = Integer.parseInt(parts[1]); 697 int year = Integer.parseInt(parts[2]); 698 r = new Integer(year).toString() + "-" + String.format("%02d", month) + "-" + String.format("%02d", day); 699 } catch (Exception e) { 700 } 701 702 return r; 703 } 704 705 /** 680 706 * Construct tag string for clipboard 681 707 * @param k OSM Key … … 710 736 c.append(tagToString("building:flats", Integer.toString(m_objekt_byty))); 711 737 } 712 if (m_objekt_dokonceni.length() > 0) { 713 c.append(tagToString("start_date", m_objekt_dokonceni)); 738 if (m_objekt_dokonceni.length() > 0 && convertDate(m_objekt_dokonceni).length() > 0) { 739 c.append(tagToString("start_date", convertDate(m_objekt_dokonceni))); 740 } 741 if (m_objekt_zpusob_vyuziti_kod.length() > 0) { 742 c.append(tagToString("building:ruian:type", m_objekt_zpusob_vyuziti_kod)); 714 743 } 715 744 c.append(tagToString("source", "cuzk:ruian"));
Note:
See TracChangeset
for help on using the changeset viewer.