a.binder 9 years ago
parent
commit
8950ed026a

+ 3 - 1
SE/dev/php-cli/build__biale_plamy.xml

@@ -13,6 +13,7 @@
         <property name="joins2ways.xml" value="joins2ways.xml"/>
         <property name="points2ID_Way.xml" value="points2ID_Way.xml"/>
         <property name="ways_2ID_Way.xml" value="ways_2ID_Way.xml"/>
+        <property name="points2joins.xml" value="points2joins.xml"/>
             <property name="ways2joins.xml" value="ways2joins.xml"/>
              <property name="ways_asText.xml" value="ways_asText.xml"/>
             <property name="joins2ways_z_ID_Way.xsl" value="joins2ways_z_ID_Way.xsl"/>
@@ -29,7 +30,7 @@
             
             <property name="cables_from_joins_to_PE.xsl" value="cables_from_joins_to_PE.xsl"/>
             <property name="cables_from_joins_to_PE.xml" value="cables_from_joins_to_PE.xml"/><!-- xml do wygenerowania  -->
-    
+        
             <property name="biale_put_Cables_to_PE.php" value="biale_put_Cables_to_PE.php"/>
     
     <target name="check" >
@@ -65,6 +66,7 @@
     </target>
     
     <target name="clean">
+        <delete file="${points2joins.xml}"/>
         <delete file="${ways2joins.xml}"/>
         <delete file="${ways_asText.xml}"/>
         <delete file="${joins_asText.xml}"/>

+ 8 - 3
SE/dev/php-cli/cables_from_joins_to_PE.xsl

@@ -12,6 +12,7 @@
     <xsl:variable name="PE_candidates_dump" select="doc('edge_paths_with_PE.xml')"/>
     <xsl:variable name="joins_asText" select="doc('joins_asText.xml')"/>
     <xsl:variable name="edge_joins_filled_paths" select="doc('edge_joins_filled_paths.xml') "/>
+    <xsl:variable name="points2joins" select="doc('points2joins.xml')"/>
     
     <!-- <joins_asText>
         <item id="0">POINT (18.7909 51.701067999083)</item>-->
@@ -33,16 +34,20 @@
         <!-- jedziemy po joins2ways_z_ID_Way, sprawdzamy czy jest dla niego PE_candidates_dump , jak tak, to szukamy jego PE i liczymy sciezke 
                lub probujemy rysowac zawsze od konca drogi-->
             
-            <!-- trzeba sprawdzic czy join jest klientem - czy tylko PE! -->
             
         <xsl:for-each select="item">
+            <xsl:variable name="ID_Way" select="@ID_Way"/>
+            <xsl:variable name="Joins" select="@id"/>
             <xsl:choose> 
+                <!-- trzeba sprawdzic czy join jest klientem - czy tylko PE! -->
+                <xsl:when test="not($points2joins/points2joins/item/text()=$Joins)">
+                    <not_candidate><xsl:attribute name="descr" select="'this is probably join from way'"/></not_candidate>
+                </xsl:when>
                 <xsl:when test="$PE_candidates_dump/PE_candidates_dump/LINESTRING[@ID_Way=current()/@ID_Way]">
                     <cable_to_PE_to_be_calculated>
                         <xsl:attribute name="ID_Way" select="@ID_Way"/>
                         <xsl:attribute name="Joins" select="@id"/>
-                        <xsl:variable name="ID_Way" select="@ID_Way"/>
-                        <xsl:variable name="Joins" select="@id"/>
+                       
                         
                          <!-- idziemy po drodze,  -->
                         <xsl:variable name="Join_X" select="$joins_asText_Path_Point/joins_asText/item[@id=$Joins]/As_POINT_to_xml/@X"/>