|
|
@@ -20,7 +20,7 @@
|
|
|
|
|
|
<xsl:param name="edge_joins_filled_paths" select="'edge_joins_filled_paths'"/> <!-- katalog do zapisywania sciezek -->
|
|
|
|
|
|
- <xsl:param name="debug" /> <!-- set 1 to debug -->
|
|
|
+ <xsl:param name="debug" /> <!-- set 1 to debug -->
|
|
|
|
|
|
<xsl:output indent="yes"/>
|
|
|
<xsl:strip-space elements="*"/>
|
|
|
@@ -64,6 +64,7 @@
|
|
|
<xsl:attribute name="Join_Y1" select="$Join_Y1"/>
|
|
|
<xsl:attribute name="Join_X2" select="$Join_X2"/>
|
|
|
<xsl:attribute name="Join_Y2" select="$Join_Y2"/>
|
|
|
+
|
|
|
<xsl:variable name="Ways">
|
|
|
<xsl:for-each select="$ways_asText_z_ID_xml/ways_asText_z_ID_xml/item[@ID_Way=$ID_Way]">
|
|
|
<Way>
|
|
|
@@ -132,9 +133,10 @@
|
|
|
</Way_next_cand>
|
|
|
</xsl:for-each>
|
|
|
</xsl:variable>
|
|
|
+ <!-- todo nei wiem czy potrzebne to echo -->
|
|
|
<xsl:copy-of select="$Ways_J2_W2"/>
|
|
|
<!-- poszukamy czy Way_X2 wystepuje -->
|
|
|
- </Ways>
|
|
|
+ </Ways>
|
|
|
</xsl:variable>
|
|
|
|
|
|
<!--<xsl:variable name="Way_1_or_2">
|
|
|
@@ -228,7 +230,44 @@
|
|
|
<xsl:attribute name="not_id" select="$not_id"/>
|
|
|
</debug>-->
|
|
|
<xsl:variable name="Linestring">
|
|
|
- <xsl:for-each select="$Ways/Ways/Way[@Way_X1=$Cur_X1 and @Way_Y1=$Cur_Y1 and ( not($not_id) or not(@id=$not_id)) ]">
|
|
|
+ <!-- jezeli sa zerowe drogi -->
|
|
|
+ <xsl:for-each select="$Ways/Ways/Way[ ( @Way_X1=$Cur_X1 and @Way_Y1=$Cur_Y1 or @Way_X2=$Cur_X1 and @Way_Y2=$Cur_Y1 ) and ( not($not_id) or not(@id=$not_id)) and @Way_X1=@Way_X2 and @Way_Y1=@Way_Y2 ][1]">
|
|
|
+ <LineString>
|
|
|
+ <xsl:attribute name="error" select="'zerowa droga!'"/>
|
|
|
+ <xsl:attribute name="X" select="@Way_X2"/>
|
|
|
+ <xsl:attribute name="Y" select="@Way_Y2"/>
|
|
|
+ <xsl:attribute name="not_id" select="@id"/>
|
|
|
+ <xsl:attribute name="len" select="@len"/>
|
|
|
+ <xsl:variable name="X" select="@Way_X2"/>
|
|
|
+ <xsl:variable name="Y" select="@Way_Y2"/>
|
|
|
+ <xsl:for-each select="$ways2joins/ways2joins/item[@id= current()/@id]/item"> <!-- musi byc wczesniej bo atrybut sie nie doda drugi raz-->
|
|
|
+ <xsl:for-each select="$joins_asText_xml/joins_asText_xml/item[@id= current()/text()]/bp:Path_Point">
|
|
|
+ <xsl:if test="@X=$X and @Y=$Y">
|
|
|
+ <xsl:variable name="ID_Join" select="parent::node()/@id"/>
|
|
|
+ <xsl:attribute name="ID_Join" select="$ID_Join"/>
|
|
|
+ </xsl:if>
|
|
|
+ </xsl:for-each>
|
|
|
+ </xsl:for-each>
|
|
|
+ <xsl:for-each select="$ways2joins/ways2joins/item[@id= current()/@id]/item">
|
|
|
+ <xsl:for-each select="$joins_asText_xml/joins_asText_xml/item[@id= current()/text()]/bp:Path_Point">
|
|
|
+ <xsl:if test="@X=$X and @Y=$Y">
|
|
|
+ <xsl:variable name="ID_Join" select="parent::node()/@id"/>
|
|
|
+ <!--<xsl:attribute name="ID_Join" select="$ID_Join"/>-->
|
|
|
+ <!-- punkty podpiete -->
|
|
|
+ <xsl:copy-of select="$joins2ways_z_ID_Way/joins2ways_z_ID_Way/item[@id=$ID_Join]/Points"/>
|
|
|
+ <!-- wyszukanie drog wychodzacych innych niz nasza z punktu -->
|
|
|
+ <xsl:for-each select="$joins2ways_z_ID_Way/joins2ways_z_ID_Way/item[@id=$ID_Join]/item[not(@ID_WAY=$ID_Way)]">
|
|
|
+ <Ways>
|
|
|
+ <xsl:attribute name="ID_WAY" select="@ID_WAY"/>
|
|
|
+ <xsl:attribute name="ways_id" select="text()"/>
|
|
|
+ </Ways>
|
|
|
+ </xsl:for-each>
|
|
|
+ </xsl:if>
|
|
|
+ </xsl:for-each>
|
|
|
+ </xsl:for-each>
|
|
|
+ </LineString>
|
|
|
+ </xsl:for-each>
|
|
|
+ <xsl:for-each select="$Ways/Ways/Way[@Way_X1=$Cur_X1 and @Way_Y1=$Cur_Y1 and ( not($not_id) or not(@id=$not_id)) and not(@Way_X1=@Way_X2) and not(@Way_Y1=@Way_Y2) ]">
|
|
|
<LineString>
|
|
|
<xsl:attribute name="X" select="@Way_X2"/>
|
|
|
<xsl:attribute name="Y" select="@Way_Y2"/>
|
|
|
@@ -246,8 +285,6 @@
|
|
|
</xsl:if>
|
|
|
</xsl:for-each>
|
|
|
</xsl:for-each>
|
|
|
-
|
|
|
-
|
|
|
<xsl:for-each select="$ways2joins/ways2joins/item[@id= current()/@id]/item">
|
|
|
<xsl:for-each select="$joins_asText_xml/joins_asText_xml/item[@id= current()/text()]/bp:Path_Point">
|
|
|
<xsl:if test="@X=$X and @Y=$Y">
|
|
|
@@ -268,7 +305,7 @@
|
|
|
</xsl:for-each>
|
|
|
</LineString>
|
|
|
</xsl:for-each>
|
|
|
- <xsl:for-each select="$Ways/Ways/Way[@Way_X2=$Cur_X1 and @Way_Y2=$Cur_Y1 and ( not($not_id) or not(@id=$not_id)) ]">
|
|
|
+ <xsl:for-each select="$Ways/Ways/Way[@Way_X2=$Cur_X1 and @Way_Y2=$Cur_Y1 and ( not($not_id) or not(@id=$not_id)) and not(@Way_X1=@Way_X2) and not(@Way_Y1=@Way_Y2) ]">
|
|
|
<LineString>
|
|
|
<xsl:attribute name="X" select="@Way_X1"/>
|
|
|
<xsl:attribute name="Y" select="@Way_Y1"/>
|