a.binder 9 gadi atpakaļ
vecāks
revīzija
b4af0a9e44
1 mainītis faili ar 0 papildinājumiem un 117 dzēšanām
  1. 0 117
      SE/dev/php-cli/cables_from_joins_to_PE.xsl

+ 0 - 117
SE/dev/php-cli/cables_from_joins_to_PE.xsl

@@ -235,68 +235,6 @@
     
     
     
-        <!-- na podstawie Joins jade do PE raz z przodudrugi raz z tylu -->
-       <!--<xsl:template name="detect_next_PE">
-           <xsl:param name="bp:Path_Point" required="yes"/>
-           <xsl:param name="Pos_found" required="yes"/>
-           <xsl:param name="ID_Way" required="yes"/>
-           <xsl:param name="edge_joins_filled_paths" required="yes"/>
-           <xsl:param name="ID_Point" required="yes"/>
-           <!-\-<w_gore><xsl:attribute name="Pos_found" select="$Pos_found"/>
-               <xsl:for-each select="$edge_joins_filled_paths/edge_joins_filled_paths/item[@id=$ID_Way]/bp:Path_Point">
-                    
-                </xsl:for-each>
-            </w_gore>-\->
-           <xsl:variable name="Next_PE_Pos" select="min($PE_candidates_dump/PE_candidates_dump/LINESTRING[@ID_Way=$ID_Way]/bp:Path_Point[number(@Pos)&gt;number($Pos_found)]/@Pos)"/>
-           <xsl:variable name="Prev_PE_Pos" select="max($PE_candidates_dump/PE_candidates_dump/LINESTRING[@ID_Way=$ID_Way]/bp:Path_Point[number(@Pos)&lt;=number($Pos_found)]/@Pos)"/>
-           <xsl:variable name="Same_PE_Pos" select="max($PE_candidates_dump/PE_candidates_dump/LINESTRING[@ID_Way=$ID_Way]/bp:Path_Point[number(@Pos)=number($Pos_found)]/@Pos)"/>
-           <detect_next_PE>
-               <xsl:attribute name="Pos_found" select="$Pos_found"/>
-               <!-\-debug-\->
-               <xsl:copy-of select="$PE_candidates_dump/PE_candidates_dump/LINESTRING[@ID_Way=$ID_Way]/bp:Path_Point[number(@Pos)&gt;number($Pos_found)]/@Pos"/> <!-\-[number(@Pos)&gt;number($Pos_found)]-\->
-               <xsl:attribute name="Next_PE_Pos" select="$Next_PE_Pos"/>
-               <xsl:attribute name="Prev_PE_Pos" select="$Prev_PE_Pos"/>
-               <xsl:choose>
-                   <xsl:when test="( abs($Pos_found - $Next_PE_Pos)&lt;=abs($Pos_found - $Prev_PE_Pos)) or ( not($Prev_PE_Pos) and $Next_PE_Pos )">
-                       <xsl:attribute name="Going_to_next" select="$Next_PE_Pos"/>
-                       <xsl:variable name="Path_Point">
-                            <xsl:for-each select="$edge_joins_filled_paths/edge_joins_filled_paths/item[@id=$ID_Way]/bp:Path_Point[ position()&gt;=$Pos_found and position()&lt;=$Next_PE_Pos ]">
-                                <xsl:copy-of select="."/>
-                            </xsl:for-each>
-                       </xsl:variable>
-                       <xsl:copy-of select="$Path_Point"/>
-                       <xsl:call-template name="To_LINESTRING">
-                           <xsl:with-param name="Path_Point" select="$Path_Point"/>
-                       </xsl:call-template>
-                   </xsl:when>
-                   <xsl:when test="(abs($Pos_found - $Next_PE_Pos)&gt;abs($Pos_found - $Prev_PE_Pos)) or ( $Prev_PE_Pos and not($Next_PE_Pos) )">
-                       <xsl:attribute name="Going_to_prev" select="$Prev_PE_Pos"/>
-                       <xsl:variable name="Path_Point">
-                           <xsl:for-each select="$edge_joins_filled_paths/edge_joins_filled_paths/item[@id=$ID_Way]/bp:Path_Point[ position()&lt;=$Pos_found and position()&gt;=$Prev_PE_Pos ]">
-                            <xsl:copy-of select="."/>
-                        </xsl:for-each>
-                       </xsl:variable>
-                       <xsl:copy-of select="$Path_Point"/>
-                       <xsl:call-template name="To_LINESTRING">
-                           <xsl:with-param name="Path_Point" select="$Path_Point"/>
-                       </xsl:call-template>
-                   </xsl:when>
-                   <xsl:otherwise>
-                       <xsl:variable name="error">#Error 174 - nie moze byc innego wyjatku
-                           ID_Way=<xsl:value-of select="$ID_Way"/>;<xsl:value-of select="$ID_Point"/>  Pos_found=<xsl:value-of select="$Pos_found"/>; $Next_PE_Pos=<xsl:value-of select="$Next_PE_Pos"/>;
-                           $Prev_PE_Pos=<xsl:value-of select="$Prev_PE_Pos"/>; abs($Pos_found - $Next_PE_Pos)=<xsl:value-of select="abs($Pos_found - $Next_PE_Pos)"/> abs($Pos_found - $Prev_PE_Pos)=<xsl:value-of select="abs($Pos_found - $Prev_PE_Pos)"/>
-                           $Same_PE_Pos=<xsl:value-of select="$Same_PE_Pos"/>; $Pos_found=<xsl:value-of select="$Pos_found"/> ; 
-                       </xsl:variable>
-                       <xsl:message terminate="no" select="$error">
-                       <error><xsl:copy-of select="$error"/></error>
-                   </xsl:message>
-                   </xsl:otherwise>
-               </xsl:choose>
-           </detect_next_PE>
-           
-       </xsl:template>-->
-    
-    
     
         <xsl:template name="To_LINESTRING">
             <xsl:param name="Path_Point" required="yes"/>
@@ -309,63 +247,8 @@
                 <xsl:value-of select="')'"/>
             </LINESTRING>
         </xsl:template>
-    <!--
-        <xsl:template match="edge_joins_filled_paths" mode="edge_joins_filled_paths">
-            <edge_joins_filled_paths>
-                <xsl:apply-templates mode="edge_joins_filled_paths"/>
-            </edge_joins_filled_paths>
-        </xsl:template>
     
-        <xsl:template match="item" mode="edge_joins_filled_paths">
-            <item>
-                <xsl:copy-of select="@*"/>
-                <xsl:copy-of select="tried"/>
-                    <xsl:variable name="Path_Point">
-                    <xsl:apply-templates/>
-                    </xsl:variable>
-                <xsl:copy-of select="$Path_Point/tried"/>
-                <xsl:for-each select="$Path_Point/bp:Path_Point">
-                    <bp:Path_Point>
-                        <xsl:attribute name="Pos" select="position()"/>
-                        <xsl:copy-of select="@*"/>
-                    </bp:Path_Point>
-                </xsl:for-each>
-            </item>
-        </xsl:template>
-    
-        <xsl:template match="joins_asText" mode="joins_asText">
-            <joins_asText>
-                <xsl:apply-templates mode="joins_asText"/>
-            </joins_asText>
-        </xsl:template>
     
-        <xsl:template match="item" mode="joins_asText">
-            <item>
-                <xsl:copy-of select="@*"/>
-                <xsl:call-template name="As_POINT_to_xml">
-                    <xsl:with-param name="As_POINT" select="text()"/>
-                </xsl:call-template>
-            </item>
-        </xsl:template>
-    -->
-        <!-- todo do wypchniecia do funkcji ogolnych -->
-        <!--xsl:template name="As_POINT_to_xml">
-            <xsl:param name="As_POINT"/>
-            <xsl:variable name="As_POINT_tok" select=" substring-before( substring-after(normalize-space(.),'POINT (') , ')')  "/>
-            <!-\-<test1><xsl:copy-of select="$LINESTRING"/></test1>-\->
-            <xsl:variable name="As_POINT_pos">
-                <xsl:for-each select="tokenize($As_POINT_tok,' ')">
-                        <pos>
-                            <xsl:attribute name="pos" select="position()"/>
-                            <xsl:value-of select="."/>
-                        </pos>
-                    </xsl:for-each>
-            </xsl:variable>
-            <As_POINT_to_xml>
-                <xsl:attribute name="X" select="$As_POINT_pos/pos[@pos=1]"/>
-                <xsl:attribute name="Y" select="$As_POINT_pos/pos[@pos=2]"/>
-            </As_POINT_to_xml>
-        </xsl:template>-->
         <xsl:template match="*"/>