a.binder 9 лет назад
Родитель
Сommit
9a89a70301
1 измененных файлов с 8 добавлено и 6 удалено
  1. 8 6
      SE/dev/php-cli/biale_plamy-generate_data.php

+ 8 - 6
SE/dev/php-cli/biale_plamy-generate_data.php

@@ -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']);