a.binder пре 9 година
родитељ
комит
112e15c30b

+ 8 - 2
SE/dev/php-cli/biale_put_Cables_to_PE.php

@@ -127,11 +127,14 @@ foreach($cables_from_joins_to_PE->xpath('cable_to_PE_to_be_calculated') as $chil
 		   //	echo "#87Child";print_r($b[0]);
 		   if($a=='ID_Way') $ID_Way=$b[0];
 		    if($a=='Joins') $Joins=$b[0];
+		    if($a=='ID_Point') $ID_Point=$b[0];
+
 		   //if($a=='Count') $Count=$b[0];
 	   }
 	  //echo $child->getName() . ": " . " ID_Way: ".$ID_Way. " : ";
 	   settype($ID_Way, "integer");
 	   settype($Joins, "integer");
+	   settype($ID_Point, "integer");
 
 	   foreach($child->xpath('found_in_path_in_edge_joins_filled_path') as $Path_Point_xml)  {
 		//   detect_next_PE/LINESTRING
@@ -143,6 +146,8 @@ foreach($cables_from_joins_to_PE->xpath('cable_to_PE_to_be_calculated') as $chil
 		   $cables_from_joins_to_PE_arr[$id_j]['LINESTRING']=$LINESTRING;
 		   $cables_from_joins_to_PE_arr[$id_j]['Joins']=$Joins;
 		   $cables_from_joins_to_PE_arr[$id_j]['ID_Way']=$ID_Way;
+		   $cables_from_joins_to_PE_arr[$id_j]['ID_Point']=$ID_Point;
+
 
 
 	   }
@@ -158,8 +163,9 @@ unset($ID_Way);
 
 foreach($cables_from_joins_to_PE_arr as $id_j=>$Path_Point_val) {
 		
-		$sql_Path_Point_val="insert into Rozdzielcza_test_bzyk_Cables_to_PE (the_geom,ID_Way)
-		     values (ST_GeomFromText('".$Path_Point_val['LINESTRING']."'),'".$Path_Point_val['ID_Way']."'   )   ";
+		$sql_Path_Point_val="insert into Rozdzielcza_test_bzyk_Cables_to_PE (the_geom,ID_Way,ID_Point)
+		     values (ST_GeomFromText('".$Path_Point_val['LINESTRING']."'),'".$Path_Point_val['ID_Way']."',
+		     '".$Path_Point_val['ID_Way']."'   )   ";
 		    echo "#216Query path ins:: ".$sql_Path_Point_val."  ";
 		    //if(strlen($edge_joins_filled_paths[$ID_Way]['asText'])>2)
 		      DB::getPDO()->query($sql_Path_Point_val);

+ 1 - 2
SE/dev/php-cli/cables_from_joins_to_PE.xsl

@@ -49,8 +49,7 @@
                     <cable_to_PE_to_be_calculated>
                         <xsl:attribute name="ID_Way" select="@ID_Way"/>
                         <xsl:attribute name="Joins" select="@id"/>
-                       
-                        
+                        <xsl:attribute name="ID_Point" select="@ID_Point"/>
                          <!-- idziemy po drodze,  -->
                         <xsl:variable name="Join_X" select="$joins_asText_Path_Point/joins_asText/item[@id=$Joins]/As_POINT_to_xml/@X"/>
                         <xsl:variable name="Join_Y" select="$joins_asText_Path_Point/joins_asText/item[@id=$Joins]/As_POINT_to_xml/@Y"/>