a.binder %!s(int64=9) %!d(string=hai) anos
pai
achega
843e931b04
Modificáronse 1 ficheiros con 8 adicións e 3 borrados
  1. 8 3
      SE/dev/php-cli/biale_plamy-generate_data.php

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

@@ -122,15 +122,20 @@ foreach ($ways2cut as $way_key => $xpoint_keys) {
 	//$xpoint_keys=$value_arr['key'];
 	$way = Vendor_Geophp::load($ways_asText[$way_key], 'wkt');
 	foreach ($xpoint_keys as $xpoint_key_arr) {
+	
+	if($joins_asText   ) {
 		$xpoint_key=$xpoint_key_arr['key'];
 		$ID_Way=$xpoint_key_arr['ID_Way'];
 		$xpoint = Vendor_Geophp::load($xpoints[$xpoint_key], 'wkt');
-		$key = array_push($joins_asText, $xpoint->asText())-1;
-		foreach ($xpoints2points[$xpoint_key] as $point_key) {
-			$points2joins[$point_key] = $key;
+		if($xpoint) { ///sypie errorem
+			$key = array_push($joins_asText, $xpoint->asText())-1; //blad
+			foreach ($xpoints2points[$xpoint_key] as $point_key) {
+				$points2joins[$point_key] = $key;
+			}
 		}
 		$distances[$xpoint_key] = pointsDistance($way->startPoint(), $xpoint);
 	}
+	}
 	asort($distances);
 
 	$sub_xpoints = array();