Changeset 30373 in osm for applications/editors/josm/plugins/pointInfo/servers
- Timestamp:
- 2014-03-27T22:33:13+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.