| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- ini_set('display_errors', 'On');
- error_reporting(E_ALL);
- $_SERVER['SERVER_NAME'] = 'biuro.biall-net.pl';
- //when used in /Library/Server/Web/Data/Sites/bzyk-biale-plamy-php-temp/SE/dev on biuro.biall-net.pl
- if( file_exists ( "../../se-lib/bootstrap.php"))
- require("../../se-lib/bootstrap.php");
- //when used in in native SE
- else require("../../../../SE-production-git/SE/se-lib/bootstrap.php");
- Lib::loadClass("Vendor_Geophp");
- $db = DB::getDB();
- /*$sql="create temporary table Rozdzielcza_test_bzyk_punkty_adresowe_temp select * from Rozdzielcza_test_bzyk_punkty_adresowe;
- -- 1 Dorobiona funkcja do pokazywania ID_Way
- update Rozdzielcza_test_bzyk_punkty_adresowe_temp t1 set t1.the_geom_nearest_way=test_find_nearest_way(t1.ID);
- update Rozdzielcza_test_bzyk_punkty_adresowe_temp t1 set t1.ID_Way=test_find_nearest_way_ID(t1.ID);
- update Rozdzielcza_test_bzyk_punkty_adresowe t1 join Rozdzielcza_test_bzyk_punkty_adresowe_temp t2 on t1.ID = t2.ID set t1.the_geom_nearest_way=t2.the_geom_nearest_way , t1.ID_Way=t2.ID_Way ;
- -- 3
- drop table Rozdzielcza_test_bzyk_punkty_adresowe_temp;
- update Rozdzielcza_test_bzyk_punkty_adresowe set the_geom_xpoint=test_find_xpoint(the_geom,the_geom_nearest_way);
- -- co to jest ten point? - to punt na drodze odpowiadajacy najblizszej
- -- 4
- truncate table Rozdzielcza_test_bzyk_przylacza;
- insert into Rozdzielcza_test_bzyk_przylacza (the_geom,ID_Way) select
- linefromtext(concat('linestring(',x(the_geom),' ',y(the_geom),',',x(the_geom_xpoint),' ',y(the_geom_xpoint),')')) ,
- ID from Rozdzielcza_test_bzyk_punkty_adresowe;
- ";
- */
- $result = DB::getPDO()->fetchall($sql);
-
- if($result) echo "res OK!";
|