a.binder 9 лет назад
Родитель
Сommit
34c51b0fff
1 измененных файлов с 9 добавлено и 3 удалено
  1. 9 3
      SE/dev/php-cli/edge_paths_with_PE_controll.xsl

+ 9 - 3
SE/dev/php-cli/edge_paths_with_PE_controll.xsl

@@ -141,6 +141,9 @@
                                     </xsl:if>
                                     <xsl:attribute name="not_id" select="@not_id"/>
                                 </xsl:when>
+                                <xsl:otherwise>
+                                    <xsl:attribute name="point_count" select="0"/>
+                                </xsl:otherwise>
                             </xsl:choose>
                             <xsl:attribute name="id_path" select="@id_path"/>
                             <xsl:copy-of select="@point_count"/>
@@ -168,9 +171,10 @@
                             <xsl:attribute name="bit_max_Pos" select="$bit_max_Pos"/>
                             <xsl:attribute name="id_path" select="@id_path"/>
                             <xsl:attribute name="point_count_Pos" select="sum(current-group()/@point_count)"/>
-                            <xsl:attribute name="point_count" select="@point_count"/>
                             <xsl:attribute name="LineStringCount" select="count( current-group())"/>
                             <xsl:attribute name="len_sum" select="sum(current-group()/@len)"/>
+                            <xsl:attribute name="distanceBeg" select="min(current-group()/number(@distance))"/>
+                            <xsl:attribute name="distanceEnd" select="max(current-group()/number(@distance))"/>
                             <!--<xsl:attribute name="GroupPos" select="position()"/>-->
                                 <xsl:for-each select="current-group()">
                                     <xsl:copy-of select="."/>
@@ -195,8 +199,10 @@
                         <xsl:attribute name="LineStringCount" select="@LineStringCount"/>
                         <xsl:attribute name="len_sum" select="@len_sum"/>
                         <xsl:attribute name="point_count_Pos" select="@point_count_Pos"/>
+                        <xsl:attribute name="distanceBeg" select="@distanceBeg"/>
+                        <xsl:attribute name="distanceEnd" select="@distanceEnd"/>
                 <!-- ida kandydaci -->
-                        <xsl:for-each select="distance2[ position() &lt;= $bit_max_Pos  or ( position()=1 and $point_count_Pos &gt; 0 ) ]"> <!-- jak jest maly wspolczynnik to chociaz jeden punkt jak sa punkty jakies w tej grupie -->
+                        <xsl:for-each select="distance2[( position() &lt;= $bit_max_Pos and @point_count &gt;0 ) or ( position()=1 and $point_count_Pos &gt; 0 ) ]"> <!-- jak jest maly wspolczynnik to chociaz jeden punkt jak sa punkty jakies w tej grupie -->
                             <xsl:sort select="@cost_dist" order="descending"/>
                             <bp:Path_Point>
                                 <xsl:attribute name="distanceGr" select="$distanceGr"/>
@@ -205,7 +211,7 @@
                                 <xsl:attribute name="distance" select="@distance"/>
                                 <xsl:attribute name="cost_dist" select="@cost_dist"/>
                                 <xsl:attribute name="id_path" select="@id_path"/>
-                                
+                                <xsl:attribute name="point_count" select="@point_count"/>
                                 
                                 <xsl:attribute name="X" select="$edge_joins_filled_path/edge_joins_filled_paths_xml/asText_XMl/LineString[@id_path = current()/@id_path]/@X"/>
                                 <xsl:attribute name="Y" select="$edge_joins_filled_path/edge_joins_filled_paths_xml/asText_XMl/LineString[@id_path = current()/@id_path]/@Y"/>