Changeset 30833 in osm for applications
- Timestamp:
- 2014-12-03T00:03:51+01:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/pointInfo
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pointInfo/build.xml
r30831 r30833 3 3 4 4 <!-- enter the SVN commit message --> 5 <property name="commit.message" value="PointInfo: Add an initial support for Ruian error reporting."/>5 <property name="commit.message" value="PointInfo: Show issues reported on Ruian buildings."/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 7 <property name="plugin.main.version" value="7001"/> -
applications/editors/josm/plugins/pointInfo/servers/RUIAN/index.php
r30466 r30833 73 73 "plati_od" => $row["plati_od"] 74 74 ); 75 76 // Reported issues on building 77 $query=" 78 select nb.user_nick, nb.datum, nbd.popis, nb.poznamka 79 from neplatne_budovy nb, neplatne_budovy_duvod nbd 80 where nb.duvod = nbd.id and nb.kod = ".$row["kod"]." 81 ; 82 "; 83 $result=pg_query($CONNECT,$query); 84 85 if (pg_num_rows($result) > 0) 86 { 87 $row = pg_fetch_array($result, 0); 88 89 90 $data["nahlaseny_problem"] = 91 array( "uzivatel" => $row["user_nick"], 92 "datum" => $row["datum"], 93 "duvod" => $row["popis"], 94 "poznamka" => $row["poznamka"] 95 ); 96 } else 97 { 98 $data["nahlaseny_problem"] = array(); 99 } 75 100 } else 101 { 76 102 $data["stavebni_objekt"] = array(); 103 $data["nahlaseny_problem"] = array(); 104 } 105 106 107 77 108 78 109 // Ghosts: Buildings without geometry in close neighbourhood -
applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/PointInfoAction.java
r30831 r30833 108 108 @Override 109 109 protected void finish() { 110 111 } 112 113 @Override 114 protected void afterFinish() { 110 115 if (htmlText.length() > 0) { 111 116 112 117 // Show result 113 System.out.println("htmlText: " + htmlText);114 118 JEditorPane msgLabel = new JEditorPane("text/html", htmlText); 115 119 msgLabel.setEditable(false); -
applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/ruianModule.java
r30831 r30833 400 400 private String m_objekt_plati_od; 401 401 402 private String m_err_user; 403 private String m_err_date; 404 private String m_err_type; 405 private String m_err_note; 406 402 407 private ArrayList <objectWithoutGeometry> m_so_bez_geometrie; 403 408 … … 450 455 m_objekt_plati_od = ""; 451 456 457 m_err_user = ""; 458 m_err_date = ""; 459 m_err_type = ""; 460 m_err_note = ""; 461 452 462 m_so_bez_geometrie = new ArrayList<objectWithoutGeometry> (); 453 463 m_adresni_mista = new ArrayList<addrPlaces> (); … … 570 580 } catch (Exception e) { 571 581 System.out.println("stavebni_objekt: " + e.getMessage()); 582 } 583 584 // ========================================================================= 585 try { 586 JsonObject errObjekt = obj.getJsonObject("nahlaseny_problem"); 587 588 try { 589 m_err_user = errObjekt.getString("uzivatel"); 590 } catch (Exception e) { 591 System.out.println("nahlaseny_problem.uzivatel: " + e.getMessage()); 592 } 593 594 try { 595 m_err_date = errObjekt.getString("datum"); 596 } catch (Exception e) { 597 System.out.println("nahlaseny_problem.datum: " + e.getMessage()); 598 } 599 600 try { 601 m_err_type = errObjekt.getString("duvod"); 602 } catch (Exception e) { 603 System.out.println("nahlaseny_problem.duvod: " + e.getMessage()); 604 } 605 606 try { 607 m_err_note = errObjekt.getString("poznamka"); 608 } catch (Exception e) { 609 System.out.println("nahlaseny_problem.poznamka: " + e.getMessage()); 610 } 611 612 } catch (Exception e) { 613 System.out.println("nahlaseny_problem: " + e.getMessage()); 572 614 } 573 615 … … 931 973 return ""; 932 974 933 r.append("<html><body bgcolor=\"white\" color=\"black\" topmargin=\"2\" leftmargin=\"2\">");975 r.append("<html><body bgcolor=\"white\" color=\"black\" ><table><tr><td>"); 934 976 r.append("<br/>"); 935 977 if (m_objekt_ruian_id > 0) { … … 946 988 r.append("<b>Datum dokončení: </b>" + m_objekt_dokonceni + "<br/>"); 947 989 r.append("<b>Platí od: </b>" + m_objekt_plati_od + "<br/>"); 948 r.append("<br/>");949 990 950 991 if (m_adresni_mista.size() > 1) { … … 952 993 // More address places 953 994 int i = 0; 995 r.append("<br/>"); 954 996 r.append("<b>" + m_adresni_mista.get(i).getCisloTyp() + "</b> (více adres)<b>: </b>" + m_adresni_mista.get(i).getCisloDomovni() + "<br/>"); 955 997 r.append("<b>Část obce: </b>" + m_adresni_mista.get(i).getCastObce()); … … 969 1011 // Without building number 970 1012 int i = 0; 1013 r.append("<br/>"); 971 1014 r.append("<i><u>Informace o adrese</u></i><br/>"); 972 1015 r.append("<b>Budova: </b>" + m_adresni_mista.get(i).getCisloTyp() + "<br/>"); … … 991 1034 x_name = "/orientační"; 992 1035 } 1036 r.append("<br/>"); 993 1037 r.append("<i><u>Informace o adrese</u></i><br/>"); 994 1038 r.append("<b>RUIAN id: </b>"+ m_adresni_mista.get(i).getRuianID() +" <a href="+ url_adresni_misto + m_adresni_mista.get(i).getRuianID() +">" + icon_ext_link + "</a>"); … … 1018 1062 1019 1063 } 1064 r.append("<br/>"); 1065 } 1066 1067 // Reported errors 1068 if (m_objekt_ruian_id > 0 && !m_err_user.equals("")) { 1069 r.append("<i><u>Nahlášený problém</u></i>"); 1070 r.append(" <a href=" + url_ruian_error + m_objekt_ruian_id + ">"+ icon_ext_link +"</a><br/>"); 1071 r.append("<b>Nahlásil: </b>" + m_err_user); 1072 r.append("<br/>"); 1073 r.append("<b>Dne: </b>" + m_err_date); 1074 r.append("<br/>"); 1075 r.append("<b>Typ problému: </b>" + m_err_type); 1076 r.append("<br/>"); 1077 if (!m_err_note.equals("")) { 1078 r.append("<b>Poznámka: </b>" + m_err_note); 1079 r.append("<br/>"); 1080 } 1020 1081 r.append("<br/>"); 1021 1082 } 1083 1084 // Address places 1022 1085 if (m_adresni_mista.size() > 1 && m_objekt_ruian_id > 0) { 1023 1086 String x = ""; … … 1027 1090 r.append("<i><u>Adresní místa</u></i><br/>"); 1028 1091 for (int i=0; i<m_adresni_mista.size(); i++) { 1029 // r.append(m_adresni_mista.get(i).getRuianID());1030 1092 r.append(m_adresni_mista.get(i).getUlice() + " " + x + m_adresni_mista.get(i).getCisloDomovni()); 1031 1093 if (!m_adresni_mista.get(i).getCisloOrientacni().isEmpty()) { … … 1142 1204 r.append("<hr/>"); 1143 1205 r.append("<center><i><small>Zdroj: <a href=\"http://www.ruian.cz/\">" + m_source + "</a></small></i></center>"); 1144 r.append("</ body></html>");1206 r.append("</td></tr></table></body></html>"); 1145 1207 1146 1208 return r.toString(); … … 1395 1457 1396 1458 private String m_text = ""; 1397 private String URL = "http://josm.poloha.net/pointInfo/v 3/index.php";1459 private String URL = "http://josm.poloha.net/pointInfo/v4/index.php"; 1398 1460 protected PointInfoServer server = new PointInfoServer(); 1399 1461
Note:
See TracChangeset
for help on using the changeset viewer.