|
|
@@ -94,12 +94,14 @@ foreach ($result as $row) {
|
|
|
$points2ID_Way[$row['ID']] = $row['ID_Way'] ;
|
|
|
$points_asText[$row['ID']] = $points[$row['ID']]->asText();
|
|
|
$xpoint = Vendor_Geophp::load($row['xpoint'], 'wkt');
|
|
|
- if (!($key = array_search($xpoint->asText(), $xpoints))) $key = array_push($xpoints, $xpoint->asText())-1;
|
|
|
- $xpoints2points[$key][] = $row['ID'];
|
|
|
- $points2xpoints[$row['ID']] = $key;
|
|
|
-
|
|
|
- $way = Vendor_Geophp::load($row['way'], 'wkt');
|
|
|
-
|
|
|
+ //blad dziwny sqix
|
|
|
+ if($xpoints) {
|
|
|
+ if (!($key = array_search($xpoint->asText(), $xpoints))) $key = array_push($xpoints, $xpoint->asText())-1;
|
|
|
+ $xpoints2points[$key][] = $row['ID'];
|
|
|
+ $points2xpoints[$row['ID']] = $key;
|
|
|
+
|
|
|
+ $way = Vendor_Geophp::load($row['way'], 'wkt');
|
|
|
+ }
|
|
|
if (!(in_array($xpoint->asText(), $joins_asText))) {
|
|
|
if (@!in_array($key, $ways2cut[array_search($way->asText(), $ways_asText)])) {
|
|
|
$ways2cut[array_search($way->asText(), $ways_asText)][] = array('key'=>$key,'ID_Way'=>$row['ID_Way']);
|