Changeset 30373 in osm for applications/editors/josm
- Timestamp:
- 2014-03-27T22:33:13+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/pointInfo
- Files:
-
- 3 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pointInfo/README.md
r30372 r30373 1 ![](http://www.kyralovi.cz/tmp/josm/pointInfo_ v1.png)1 ![](http://www.kyralovi.cz/tmp/josm/pointInfo_20140327.png) 2 2 3 3 --- … … 7 7 This plugin shows all available information for clicked point from external database. 8 8 There is only a Czech RUIAN module available at this moment. 9 10 Plugin could be easy extend to show another data source. 9 11 10 12 ##Author … … 22 24 * GPL v2 or later 23 25 24 25 ##Notes:26 27 - Plugin could be easy extend to show another data source.28 - Input is position, output html string that is shown on message.29 - Optionally you can define special links (file://...) that will be sent back to the module to the performAction method30 31 26 --- 32 27 ###The RUIAN module … … 35 30 36 31 * Additional actions are available : 32 * [![](https://raw.githubusercontent.com/mkyral/josm-pointInfo/master/images/dialogs/open-external-link.png)] Open on external site 37 33 * [![](https://raw.githubusercontent.com/mkyral/josm-pointInfo/master/images/dialogs/copy-tags.png)] Copy tags to clipboard 38 34 * [![](https://raw.githubusercontent.com/mkyral/josm-pointInfo/master/images/dialogs/create-addr.png)] Create an address point on position where was clicked … … 41 37 --- 42 38 ###The interface: 39 40 - Input is position, output html string that is shown on message. 41 - Optionally you can define special links (file://...) that will be sent back to the module to the performAction method 43 42 44 43 ```java -
applications/editors/josm/plugins/pointInfo/build.xml
r30372 r30373 15 15 16 16 <!-- enter the SVN commit message --> 17 <property name="commit.message" value="PointInfo: Replace openWebPage function by josm.tools.OpenBrowser."/>17 <property name="commit.message" value="PointInfo: Add more external links, nicer icons."/> 18 18 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 19 19 <property name="plugin.main.version" value="6238"/> -
applications/editors/josm/plugins/pointInfo/servers/RUIAN/index.php
r30334 r30373 59 59 am.cislo_domovni, 60 60 am.cislo_orientacni_hodnota || coalesce(am.cislo_orientacni_pismeno, '') cislo_orientacni, 61 am.adrp_psc psc, ul.nazev ulice, c.nazev cast_obce, 62 momc.nazev mestska_cast, 63 ob.nazev obec, ok.nazev okres, vu.nazev kraj 61 am.adrp_psc psc, 62 ul.kod ulice_kod, ul.nazev ulice, 63 c.kod cast_obce_kod, c.nazev cast_obce, 64 momc.kod mestska_cast_kod, momc.nazev mestska_cast, 65 ob.kod obec_kod, ob.nazev obec, 66 ok.kod okres_kod, ok.nazev okres, 67 vu.kod kraj_kod, vu.nazev kraj 64 68 from ruian.rn_adresni_misto am 65 69 left outer join rn_stavebni_objekt s on am.stavobj_kod = s.kod and not s.deleted … … 94 98 "cislo_domovni" => $row["cislo_domovni"], 95 99 "cislo_orientacni" => $row["cislo_orientacni"], 100 "ulice_kod" => $row["ulice_kod"], 96 101 "ulice" => $row["ulice"], 102 "cast_obce_kod" => $row["cast_obce_kod"], 97 103 "cast_obce" => $row["cast_obce"], 104 "mestska_cast_kod" => $row["mestska_cast_kod"], 98 105 "mestska_cast" => $row["mestska_cast"], 106 "obec_kod" => $row["obec_kod"], 99 107 "obec" => $row["obec"], 108 "okres_kod" => $row["okres_kod"], 100 109 "okres" => $row["okres"], 110 "kraj_kod" => $row["kraj_kod"], 101 111 "kraj" => $row["kraj"], 102 112 "psc" => $row["psc"] … … 248 258 $query=" 249 259 select ku.kod, ku.nazev, 250 ob.nazev obec, ok.nazev okres, vu.nazev kraj 260 ob.kod obec_kod, ob.nazev obec, 261 ok.kod okres_kod, ok.nazev okres, 262 vu.kod kraj_kod, vu.nazev kraj 251 263 from rn_katastralni_uzemi ku 252 264 left outer join rn_obec ob on ku.obec_kod = ob.kod and not ob.deleted … … 267 279 array( "ruian_id" => $row["kod"], 268 280 "nazev" => $row["nazev"], 281 "obec_kod" => $row["obec_kod"], 269 282 "obec" => $row["obec"], 283 "okres_kod" => $row["okres_kod"], 270 284 "okres" => $row["okres"], 285 "kraj_kod" => $row["kraj_kod"], 271 286 "kraj" => $row["kraj"], 272 287 ); … … 276 291 } 277 292 278 // cadastral area279 $query="280 select ku.kod, ku.nazev,281 ob.nazev obec, ok.nazev okres, vu.nazev kraj282 from rn_katastralni_uzemi ku283 left outer join rn_obec ob on ku.obec_kod = ob.kod and not ob.deleted284 left outer join rn_okres ok on ob.okres_kod = ok.kod and not ok.deleted285 left outer join rn_vusc vu on ok.vusc_kod = vu.kod and not vu.deleted286 where st_contains(ku.hranice,st_transform(st_geomfromtext('POINT(".$lon." ".$lat.")',4326),900913))287 and not ku.deleted288 limit 1;289 ";290 291 $result=pg_query($CONNECT,$query);292 $error= pg_last_error($CONNECT);293 if (pg_num_rows($result) > 0)294 {295 $row = pg_fetch_array($result, 0);296 297 $data["katastr"] =298 array( "ruian_id" => $row["kod"],299 "nazev" => $row["nazev"],300 "obec" => $row["obec"],301 "okres" => $row["okres"],302 "kraj" => $row["kraj"],303 );304 } else305 {306 $data["katastr"] = array();307 }308 309 293 echo json_encode($data); 310 294 -
applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/ruianModule.java
r30367 r30373 61 61 private String m_cislo_domovni; 62 62 private String m_cislo_orientacni; 63 private long m_ulice_kod; 63 64 private String m_ulice; 65 private long m_cast_obce_kod; 64 66 private String m_cast_obce; 67 private long m_mestska_cast_kod; 65 68 private String m_mestska_cast; 69 private long m_obec_kod; 66 70 private String m_obec; 71 private long m_okres_kod; 67 72 private String m_okres; 73 private long m_kraj_kod; 68 74 private String m_kraj; 69 75 private String m_psc; … … 80 86 m_cislo_domovni = ""; 81 87 m_cislo_orientacni = ""; 88 m_ulice_kod = 0; 82 89 m_ulice = ""; 90 m_cast_obce_kod = 0; 83 91 m_cast_obce = ""; 92 m_mestska_cast_kod = 0; 84 93 m_mestska_cast = ""; 94 m_obec_kod = 0; 85 95 m_obec = ""; 96 m_okres_kod = 0; 86 97 m_okres = ""; 98 m_kraj_kod = 0; 87 99 m_kraj = ""; 88 100 m_psc = ""; … … 113 125 } 114 126 127 public void setUliceID (long v) { 128 m_ulice_kod = v; 129 } 130 115 131 public void setUlice (String v) { 116 132 m_ulice = v; 117 133 } 118 134 135 public void setCastObceID (long v) { 136 m_cast_obce_kod = v; 137 } 138 119 139 public void setCastObce (String v) { 120 140 m_cast_obce = v; 121 141 } 122 142 143 public void setMestskaCastID (long v) { 144 m_mestska_cast_kod = v; 145 } 146 123 147 public void setMestskaCast (String v) { 124 148 m_mestska_cast = v; 125 149 } 126 150 151 public void setObecID (long v) { 152 m_obec_kod = v; 153 } 154 127 155 public void setObec (String v) { 128 156 m_obec = v; 129 157 } 130 158 159 public void setOkresID (long v) { 160 m_okres_kod = v; 161 } 162 131 163 public void setOkres (String v) { 132 164 m_okres = v; 133 165 } 134 166 167 public void setKrajID (long v) { 168 m_kraj_kod = v; 169 } 170 135 171 public void setKraj (String v) { 136 172 m_kraj = v; … … 165 201 } 166 202 203 public long getUliceID () { 204 return m_ulice_kod; 205 } 206 167 207 public String getUlice () { 168 208 return m_ulice; 169 209 } 210 211 public long getCastObceID () { 212 return m_cast_obce_kod; 213 } 214 170 215 public String getCastObce () { 171 216 return m_cast_obce; 172 217 } 173 218 219 public long getMestskaCastID () { 220 return m_mestska_cast_kod; 221 } 222 174 223 public String getMestskaCast () { 175 224 return m_mestska_cast; 176 225 } 177 226 227 public long getObecID () { 228 return m_obec_kod; 229 } 230 178 231 public String getObec () { 179 232 return m_obec; 180 233 } 181 234 235 public long getOkresID () { 236 return m_okres_kod; 237 } 238 182 239 public String getOkres () { 183 240 return m_okres; 241 } 242 243 public long getKrajID () { 244 return m_kraj_kod; 184 245 } 185 246 … … 226 287 private long m_katastr_ruian_id; 227 288 private String m_katastr_nazev; 289 private long m_katastr_obec_kod; 228 290 private String m_katastr_obec; 291 private long m_katastr_okres_kod; 229 292 private String m_katastr_okres; 293 private long m_katastr_kraj_kod; 230 294 private String m_katastr_kraj; 231 295 … … 271 335 m_katastr_ruian_id = 0; 272 336 m_katastr_nazev = ""; 337 m_katastr_obec_kod = 0; 273 338 m_katastr_obec = ""; 339 m_katastr_okres_kod = 0; 274 340 m_katastr_okres = ""; 341 m_katastr_kraj_kod = 0; 275 342 m_katastr_kraj = ""; 276 343 … … 427 494 428 495 try { 496 am.setUliceID(Long.parseLong(adresniMisto.getString("ulice_kod"))); 497 } catch (Exception e) { 498 System.out.println("adresni_mista.ulice_kod: " + e.getMessage()); 499 } 500 501 try { 429 502 am.setUlice(adresniMisto.getString("ulice")); 430 503 } catch (Exception e) { … … 433 506 434 507 try { 508 am.setCastObceID(Long.parseLong(adresniMisto.getString("cast_obce_kod"))); 509 } catch (Exception e) { 510 System.out.println("adresni_mista.cast_obce_kod: " + e.getMessage()); 511 } 512 513 try { 435 514 am.setCastObce(adresniMisto.getString("cast_obce")); 436 515 } catch (Exception e) { … … 439 518 440 519 try { 520 am.setMestskaCastID(Long.parseLong(adresniMisto.getString("mestska_cast_kod"))); 521 } catch (Exception e) { 522 System.out.println("adresni_mista.mestska_cast_kod: " + e.getMessage()); 523 } 524 525 try { 441 526 am.setMestskaCast(adresniMisto.getString("mestska_cast")); 442 527 } catch (Exception e) { … … 445 530 446 531 try { 532 am.setObecID(Long.parseLong(adresniMisto.getString("obec_kod"))); 533 } catch (Exception e) { 534 System.out.println("adresni_mista.obec:_kod " + e.getMessage()); 535 } 536 537 try { 447 538 am.setObec(adresniMisto.getString("obec")); 448 539 } catch (Exception e) { … … 451 542 452 543 try { 544 am.setOkresID(Long.parseLong(adresniMisto.getString("okres_kod"))); 545 } catch (Exception e) { 546 System.out.println("adresni_mista.okres_kod: " + e.getMessage()); 547 } 548 549 try { 453 550 am.setOkres(adresniMisto.getString("okres")); 454 551 } catch (Exception e) { 455 552 System.out.println("adresni_mista.okres: " + e.getMessage()); 553 } 554 555 try { 556 am.setKrajID(Long.parseLong(adresniMisto.getString("kraj_kod"))); 557 } catch (Exception e) { 558 System.out.println("adresni_mista.kraj_kod: " + e.getMessage()); 456 559 } 457 560 … … 543 646 544 647 try { 648 m_katastr_obec_kod = Long.parseLong(katastr.getString("obec_kod")); 649 } catch (Exception e) { 650 System.out.println("katastr.obec_kod: " + e.getMessage()); 651 } 652 653 try { 545 654 m_katastr_obec = katastr.getString("obec"); 546 655 } catch (Exception e) { … … 549 658 550 659 try { 660 m_katastr_okres_kod = Long.parseLong(katastr.getString("okres_kod")); 661 } catch (Exception e) { 662 System.out.println("katastr.okres_kod: " + e.getMessage()); 663 } 664 665 try { 551 666 m_katastr_okres = katastr.getString("okres"); 552 667 } catch (Exception e) { 553 668 System.out.println("katastr.okres: " + e.getMessage()); 669 } 670 671 try { 672 m_katastr_kraj_kod = Long.parseLong(katastr.getString("kraj_kod")); 673 } catch (Exception e) { 674 System.out.println("katastr.kraj_kod: " + e.getMessage()); 554 675 } 555 676 … … 570 691 */ 571 692 public String getHtml () { 693 694 String icon_ext_link = "<img src=" +getClass().getResource("/images/dialogs/open-external-link.png")+" border=0 alt=\"Zobrazit na stránkách RUIAN\"/>"; 695 String icon_copy_tags = "<img src=" +getClass().getResource("/images/dialogs/copy-tags.png")+" border=0 alt=\"Zobrazit na stránkách RUIAN\"/>"; 696 String icon_create_addr = "<img src=" +getClass().getResource("/images/dialogs/create-addr.png")+" border=0 alt=\"Zobrazit na stránkách RUIAN\"/>"; 697 String icon_create_addr_ruian = "<img src=" +getClass().getResource("/images/dialogs/create-addr-ruian.png")+" border=0 alt=\"Zobrazit na stránkách RUIAN\"/>"; 698 699 String url_cpost = "http://www.postaonline.cz/vyhledani-psc?p_p_id=psc_WAR_pcpvpp&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_psc_WAR_pcpvpp_struts.portlet.action=%2Fview%2FdetailPost&_psc_WAR_pcpvpp_struts.portlet.mode=view&_psc_WAR_pcpvpp_zipCode="; 700 String url_stavebni_objekt = "http://vdp.cuzk.cz/vdp/ruian/stavebniobjekty/"; 701 String url_adresni_misto = "http://vdp.cuzk.cz/vdp/ruian/adresnimista/"; 702 String url_parcela = "http://vdp.cuzk.cz/vdp/ruian/parcely/"; 703 String url_katastralni_uzemi = "http://vdp.cuzk.cz/vdp/ruian/katastralniuzemi/"; 704 String url_ulice = "http://vdp.cuzk.cz/vdp/ruian/ulice/"; 705 String url_mistni_cast = "http://vdp.cuzk.cz/vdp/ruian/castiobce/"; 706 String url_mestska_cast = "http://vdp.cuzk.cz/vdp/ruian/mestskecasti/"; 707 String url_obec = "http://vdp.cuzk.cz/vdp/ruian/obce/"; 708 String url_okres = "http://vdp.cuzk.cz/vdp/ruian/okresy/"; 709 String url_kraj = "http://vdp.cuzk.cz/vdp/ruian/vusc/"; 572 710 573 711 StringBuilder r = new StringBuilder(); … … 583 721 r.append("<br/>"); 584 722 if (m_objekt_ruian_id > 0) { 585 r.append("<i><u>Informace o budově</u></i> ");586 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/>");587 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/>");723 r.append("<i><u>Informace o budově</u></i><br/>"); 724 r.append("<b>RUIAN id: </b>"+ m_objekt_ruian_id +" <a href="+ url_stavebni_objekt + m_objekt_ruian_id +">" + icon_ext_link + "</a>"); 725 r.append(" <a href=file://tags.copy/building>"+ icon_copy_tags +"</a><br/>"); 588 726 if (m_adresni_mista.size() == 0 ) r.append("<b>Budova: </b> bez č.p./č.e<br/>"); 589 727 else if (m_adresni_mista.get(0).getCisloTyp().equals("Číslo popisné")) r.append("<b>Budova: </b>s číslem popisným<br/>"); … … 601 739 int i = 0; 602 740 r.append("<b>" + m_adresni_mista.get(i).getCisloTyp() + "</b> (více adres)<b>: </b>" + m_adresni_mista.get(i).getCisloDomovni() + "<br/>"); 603 r.append("<b>Část obce: </b>" + m_adresni_mista.get(i).getCastObce() + "<br/>"); 604 if (m_adresni_mista.get(i).getMestskaCast().length() > 0) r.append("<b>Městská část: </b>" + m_adresni_mista.get(i).getMestskaCast() + "<br/>"); 605 r.append("<b>Obec: </b>" + m_adresni_mista.get(i).getObec() +"<br/>"); 606 r.append("<b>Okres: </b>" + m_adresni_mista.get(i).getOkres() +"<br/>"); 607 r.append("<b>Kraj: </b>" + m_adresni_mista.get(i).getKraj() +"<br/>"); 741 r.append("<b>Část obce: </b>" + m_adresni_mista.get(i).getCastObce()); 742 r.append(" <a href="+ url_mistni_cast + m_adresni_mista.get(i).getCastObceID() +">" + icon_ext_link + "</a><br/>"); 743 if (m_adresni_mista.get(i).getMestskaCast().length() > 0) { 744 r.append("<b>Městská část: </b>" + m_adresni_mista.get(i).getMestskaCast()); 745 r.append(" <a href="+ url_mestska_cast + m_adresni_mista.get(i).getMestskaCastID() +">" + icon_ext_link + "</a><br/>"); 746 } 747 r.append("<b>Obec: </b>" + m_adresni_mista.get(i).getObec()); 748 r.append(" <a href="+ url_obec + m_adresni_mista.get(i).getObecID() +">" + icon_ext_link + "</a><br/>"); 749 r.append("<b>Okres: </b>" + m_adresni_mista.get(i).getOkres()); 750 r.append(" <a href="+ url_okres + m_adresni_mista.get(i).getOkresID() +">" + icon_ext_link + "</a><br/>"); 751 r.append("<b>Kraj: </b>" + m_adresni_mista.get(i).getKraj()); 752 r.append(" <a href="+ url_kraj + m_adresni_mista.get(i).getKrajID() +">" + icon_ext_link + "</a><br/>"); 608 753 609 754 } else if (m_adresni_mista.size() == 1 && (m_adresni_mista.get(0).getCisloDomovni() == null || m_adresni_mista.get(0).getCisloDomovni().isEmpty())) { … … 612 757 r.append("<i><u>Informace o adrese</u></i><br/>"); 613 758 r.append("<b>Budova: </b>" + m_adresni_mista.get(i).getCisloTyp() + "<br/>"); 614 if (m_adresni_mista.get(i).getMestskaCast().length() > 0) r.append("<b>Městská část: </b>" + m_adresni_mista.get(i).getMestskaCast() + "<br/>"); 615 r.append("<b>Obec: </b>" + m_adresni_mista.get(i).getObec() +"<br/>"); 616 r.append("<b>Okres: </b>" + m_adresni_mista.get(i).getOkres() +"<br/>"); 617 r.append("<b>Kraj: </b>" + m_adresni_mista.get(i).getKraj() +"<br/>"); 759 if (m_adresni_mista.get(i).getMestskaCast().length() > 0) { 760 r.append("<b>Městská část: </b>" + m_adresni_mista.get(i).getMestskaCast()); 761 r.append(" <a href="+ url_mestska_cast + m_adresni_mista.get(i).getMestskaCastID() +">" + icon_ext_link + "</a><br/>"); 762 } 763 r.append("<b>Obec: </b>" + m_adresni_mista.get(i).getObec()); 764 r.append(" <a href="+ url_obec + m_adresni_mista.get(i).getObecID() +">" + icon_ext_link + "</a><br/>"); 765 r.append("<b>Okres: </b>" + m_adresni_mista.get(i).getOkres()); 766 r.append(" <a href="+ url_okres + m_adresni_mista.get(i).getOkresID() +">" + icon_ext_link + "</a><br/>"); 767 r.append("<b>Kraj: </b>" + m_adresni_mista.get(i).getKraj()); 768 r.append(" <a href="+ url_kraj + m_adresni_mista.get(i).getKrajID() +">" + icon_ext_link + "</a><br/>"); 618 769 619 770 } else if (m_adresni_mista.size() == 1) { … … 627 778 } 628 779 r.append("<i><u>Informace o adrese</u></i><br/>"); 629 r.append("<b>RUIAN id: </b><a href=http://vdp.cuzk.cz/vdp/ruian/adresnimista/" + m_adresni_mista.get(i).getRuianID() +">" + m_adresni_mista.get(i).getRuianID() + "</a><br/>"); 780 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>"); 781 r.append(" <a href=file://tags.copy/address:"+i+">"+ icon_copy_tags +"</a>"); 782 r.append(" <a href=file://tags.create/address:"+i+">"+ icon_create_addr +"</a>"); 783 r.append(" <a href=file://tags.create-on-place/address:"+i+">"+ icon_create_addr_ruian +"</a><br/>"); 630 784 r.append("<b>" + m_adresni_mista.get(i).getCisloTyp() + x_name + ": </b>" + m_adresni_mista.get(i).getCisloDomovni() + x); 631 r.append(" <a href=file://tags.copy/address:"+i+"><img src="+getClass().getResource("/images/dialogs/copy-tags.png")+" border=0 alt=\"Vložit tagy do schránky\"></a>");632 r.append(" <a href=file://tags.create/address:"+i+"><img src="+getClass().getResource("/images/dialogs/create-addr.png")+" border=0 alt=\"Vytvořit adresní bod\"></a>");633 r.append(" <a href=file://tags.create-on-place/address:"+i+"><img src="+getClass().getResource("/images/dialogs/create-addr-ruian.png")+" border=0 alt=\"Vytvořit adresní bod na pozici dle RUIAN\"></a>");634 785 r.append("<br/>"); 635 if (!m_adresni_mista.get(i).getUlice().isEmpty()) r.append("<b>Ulice: </b>" + m_adresni_mista.get(i).getUlice() + "<br/>"); 636 r.append("<b>Část obce: </b>" + m_adresni_mista.get(i).getCastObce() + "<br/>"); 637 if (m_adresni_mista.get(i).getMestskaCast().length() > 0) r.append("<b>Městská část: </b>" + m_adresni_mista.get(i).getMestskaCast() + "<br/>"); 638 r.append("<b>Obec: </b>" + m_adresni_mista.get(i).getObec() + "<br/>"); 639 r.append("<b>Okres: </b>" + m_adresni_mista.get(i).getOkres() + "<br/>"); 640 r.append("<b>Kraj: </b>" + m_adresni_mista.get(i).getKraj() + "<br/>"); 641 r.append("<b>PSČ: </b>" + m_adresni_mista.get(i).getPsc() + "<br/>"); 786 if (!m_adresni_mista.get(i).getUlice().isEmpty()) { 787 r.append("<b>Ulice: </b>" + m_adresni_mista.get(i).getUlice()); 788 r.append(" <a href="+ url_ulice + m_adresni_mista.get(i).getUliceID() +">" + icon_ext_link + "</a><br/>"); 789 } 790 r.append("<b>Část obce: </b>" + m_adresni_mista.get(i).getCastObce()); 791 r.append(" <a href="+ url_mistni_cast + m_adresni_mista.get(i).getCastObceID() +">" + icon_ext_link + "</a><br/>"); 792 if (m_adresni_mista.get(i).getMestskaCast().length() > 0) { 793 r.append("<b>Městská část: </b>" + m_adresni_mista.get(i).getMestskaCast()); 794 r.append(" <a href="+ url_mestska_cast + m_adresni_mista.get(i).getMestskaCastID() +">" + icon_ext_link + "</a><br/>"); 795 } 796 r.append("<b>Obec: </b>" + m_adresni_mista.get(i).getObec()); 797 r.append(" <a href="+ url_obec + m_adresni_mista.get(i).getObecID() +">" + icon_ext_link + "</a><br/>"); 798 r.append("<b>Okres: </b>" + m_adresni_mista.get(i).getOkres()); 799 r.append(" <a href="+ url_okres + m_adresni_mista.get(i).getOkresID() +">" + icon_ext_link + "</a><br/>"); 800 r.append("<b>Kraj: </b>" + m_adresni_mista.get(i).getKraj()); 801 r.append(" <a href="+ url_kraj + m_adresni_mista.get(i).getKrajID() +">" + icon_ext_link + "</a><br/>"); 802 r.append("<b>PSČ: </b>" + m_adresni_mista.get(i).getPsc()); 803 r.append(" <a href="+ url_cpost + m_adresni_mista.get(i).getPsc() +">" + icon_ext_link + "</a><br/>"); 804 642 805 } 643 806 r.append("<br/>"); … … 650 813 r.append("<i><u>Adresní místa</u></i><br/>"); 651 814 for (int i=0; i<m_adresni_mista.size(); i++) { 652 r.append("<a href=http://vdp.cuzk.cz/vdp/ruian/adresnimista/" + m_adresni_mista.get(i).getRuianID() + ">"); 653 r.append(m_adresni_mista.get(i).getRuianID() + "</a> "); 815 // r.append(m_adresni_mista.get(i).getRuianID()); 654 816 r.append(m_adresni_mista.get(i).getUlice() + " " + x + m_adresni_mista.get(i).getCisloDomovni()); 655 817 if (!m_adresni_mista.get(i).getCisloOrientacni().isEmpty()) { 656 818 r.append("/" + m_adresni_mista.get(i).getCisloOrientacni()); 657 819 } 658 r.append(" <a href=file://tags.copy/address:"+i+"><img src="+getClass().getResource("/images/dialogs/copy-tags.png")+" border=0 alt=\"Vložit tagy do schránky\"></a>"); 659 r.append(" <a href=file://tags.create/address:"+i+"><img src="+getClass().getResource("/images/dialogs/create-addr.png")+" border=0 alt=\"Vytvořit adresní bod\"></a>"); 660 r.append(" <a href=file://tags.create-on-place/address:"+i+"><img src="+getClass().getResource("/images/dialogs/create-addr-ruian.png")+" border=0 alt=\"Vytvořit adresní bod na pozici dle RUIAN\"></a>"); 820 r.append(" <a href="+ url_adresni_misto + m_adresni_mista.get(i).getRuianID() + ">"+ icon_ext_link +"</a> "); 821 r.append(" <a href=file://tags.copy/address:"+i+">"+ icon_copy_tags +"</a>"); 822 r.append(" <a href=file://tags.create/address:"+i+">"+ icon_create_addr +"</a>"); 823 r.append(" <a href=file://tags.create-on-place/address:"+i+">"+ icon_create_addr_ruian +"</a>"); 661 824 r.append("<br/>"); 662 825 } 663 826 r.append("<br/>"); 664 // r.append("<br/>");665 827 } 666 828 … … 668 830 if (m_parcela_ruian_id > 0) { 669 831 r.append("<i><u>Informace o pozemku</u></i>"); 670 // r.append(" <a href=file://tags.copy/parcel><img src="+getClass().getResource("/images/dialogs/copy-tags.png")+" border=0 alt=\"Vložit tagy do schránky\"></a>");671 832 r.append("<br/>"); 672 r.append("<b>RUIAN id: </b><a href=http://vdp.cuzk.cz/vdp/ruian/parcely/" + m_parcela_ruian_id +">" + m_parcela_ruian_id + "</a><br/>"); 833 r.append("<b>RUIAN id: </b>"+ m_parcela_ruian_id +" <a href="+ url_parcela + m_parcela_ruian_id +">" + icon_ext_link + "</a><br/>"); 834 // r.append(" <a href=file://tags.copy/parcel>"+ icon_copy_tags +"</a>"); 673 835 r.append("<b>Druh pozemku: </b>" + m_parcela_druh_pozemku +"<br/>"); 674 836 if (m_parcela_zpusob_vyuziti != "") r.append("<b>Způsob využití: </b>" + m_parcela_zpusob_vyuziti +"<br/>"); … … 679 841 // Street 680 842 if (m_ulice_ruian_id > 0) { 681 r.append("<i><u>Informace o ulici</u></i> ");682 r.append(" <a href=file://tags.copy/street><img src="+getClass().getResource("/images/dialogs/copy-tags.png")+" border=0 alt=\"Vložit tagy do schránky\"></a><br/>");683 r.append(" <b>RUIAN id: </b><a href=http://vdp.cuzk.cz/vdp/ruian/ulice/" + m_ulice_ruian_id +">" + m_ulice_ruian_id +"</a><br/>");843 r.append("<i><u>Informace o ulici</u></i><br/>"); 844 r.append("<b>RUIAN id: </b>"+ m_ulice_ruian_id +" <a href="+ url_ulice + m_ulice_ruian_id +">" + icon_ext_link + "</a>"); 845 r.append(" <a href=file://tags.copy/street>"+ icon_copy_tags +"</a><br/>"); 684 846 r.append("<b>Jméno: </b>" + m_ulice_jmeno +"<br/>"); 685 847 r.append("<br/>"); … … 688 850 // Cadastral area 689 851 if (m_katastr_ruian_id > 0) { 690 r.append("<b>Katastrální území: </b>" + m_katastr_nazev +"<br/>"); 691 r.append("<b>Obec: </b>" + m_katastr_obec +"<br/>"); 692 r.append("<b>Okres: </b>" + m_katastr_okres +"<br/>"); 693 r.append("<b>Kraj: </b>" + m_katastr_kraj +"<br/>"); 852 r.append("<b>Katastrální území: </b>" + m_katastr_nazev); 853 r.append(" <a href="+ url_katastralni_uzemi + m_katastr_ruian_id +">" + icon_ext_link + "</a><br/>"); 854 r.append("<b>Obec: </b>" + m_katastr_obec); 855 r.append(" <a href="+ url_obec + m_katastr_obec_kod +">" + icon_ext_link + "</a><br/>"); 856 r.append("<b>Okres: </b>" + m_katastr_okres); 857 r.append(" <a href="+ url_okres + m_katastr_okres_kod +">" + icon_ext_link + "</a><br/>"); 858 r.append("<b>Kraj: </b>" + m_katastr_kraj); 859 r.append(" <a href="+url_kraj + m_katastr_kraj_kod +">" + icon_ext_link + "</a><br/>"); 694 860 r.append("<br/>"); 695 861 } … … 699 865 String x, x_name; 700 866 r.append("<i><u>Adresní místa v okolí</u></i><br/>"); 867 r.append("<table>"); 701 868 for (int i=0; i<m_adresni_mista.size(); i++) { 702 869 x = ""; … … 710 877 x_name += "/orientační"; 711 878 } 712 713 r.append("<a href=http://vdp.cuzk.cz/vdp/ruian/adresnimista/" + m_adresni_mista.get(i).getRuianID() +">"); 879 r.append("<tr><td bgcolor=#e5e5ff>"); 714 880 if (!m_adresni_mista.get(i).getUlice().isEmpty()) { 715 r.append(m_adresni_mista.get(i).getUlice() + " " + x + "</a>"); 716 r.append(" <a href=file://tags.copy/address:"+i+"><img src="+getClass().getResource("/images/dialogs/copy-tags.png")+" border=0 alt=\"Vložit tagy do schránky\"></a>"); 717 r.append(" <a href=file://tags.create/address:"+i+"><img src="+getClass().getResource("/images/dialogs/create-addr.png")+" border=0 alt=\"Vytvořit adresní bod\"></a>"); 718 r.append(" <a href=file://tags.create-on-place/address:"+i+"><img src="+getClass().getResource("/images/dialogs/create-addr-ruian.png")+" border=0 alt=\"Vytvořit adresní bod na pozici dle RUIAN\"></a>"); 719 r.append("<br/>" + m_adresni_mista.get(i).getObec() ); 881 r.append(m_adresni_mista.get(i).getUlice() + " " + x); 882 r.append("<br/><u>" + m_adresni_mista.get(i).getObec() + "</u>"); 883 r.append("</td><td valign=\"top\" bgcolor=#e5e5ff>"); 884 r.append("<a href="+ url_adresni_misto + m_adresni_mista.get(i).getRuianID() + ">"+ icon_ext_link +"</a>"); 885 r.append(" <a href=file://tags.copy/address:"+i+">"+ icon_copy_tags +"</a>"); 886 r.append(" <a href=file://tags.create/address:"+i+">"+ icon_create_addr +"</a>"); 887 r.append(" <a href=file://tags.create-on-place/address:"+i+">"+ icon_create_addr_ruian +"</a>"); 720 888 } else { 721 r.append(m_adresni_mista.get(i).getCastObce() + " " + x + "</a>"); 722 r.append(" <a href=file://tags.copy/address:"+i+"><img src="+getClass().getResource("/images/dialogs/copy-tags.png")+" border=0 alt=\"Vložit tagy do schránky\"></a>"); 723 r.append(" <a href=file://tags.create/address:"+i+"><img src="+getClass().getResource("/images/dialogs/create-addr.png")+" border=0 alt=\"Vytvořit adresní bod\"></a>"); 724 r.append(" <a href=file://tags.create-on-place/address:"+i+"><img src="+getClass().getResource("/images/dialogs/create-addr-ruian.png")+" border=0 alt=\"Vytvořit adresní bod na pozici dle RUIAN\"></a>"); 889 r.append(m_adresni_mista.get(i).getCastObce() + " " + x + " "); 725 890 if (!m_adresni_mista.get(i).getCastObce().equals(m_adresni_mista.get(i).getObec())) { 726 r.append("<br/> " + m_adresni_mista.get(i).getObec());891 r.append("<br/><u>" + m_adresni_mista.get(i).getObec() + "</u>"); 727 892 } 728 } 729 r.append("<br/>"); 730 } 893 r.append("</td><td valign=\"top\" bgcolor=#e5e5ff>"); 894 r.append("<a href="+ url_adresni_misto + m_adresni_mista.get(i).getRuianID() + ">"+ icon_ext_link +"</a>"); 895 r.append(" <a href=file://tags.copy/address:"+i+">"+ icon_copy_tags +"</a>"); 896 r.append(" <a href=file://tags.create/address:"+i+">"+ icon_create_addr +"</a>"); 897 r.append(" <a href=file://tags.create-on-place/address:"+i+">"+ icon_create_addr_ruian +"</a>"); 898 } 899 r.append("</td></tr>"); 900 } 901 r.append("</table><br/>"); 731 902 } 732 903 r.append("<hr/>");
Note:
See TracChangeset
for help on using the changeset viewer.