User Tools

Site Tools


calculate_distance

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
calculate_distance [2023/04/21 15:45] irladmincalculate_distance [2023/04/21 15:48] (current) irladmin
Line 51: Line 51:
          
         if (len(road_list) == 0):         if (len(road_list) == 0):
-            print "findCloserRoadCell: There are no roads in the map."+            print("findCloserRoadCell: There are no roads in the map.")
             return None             return None
          
Line 65: Line 65:
         node_road = getNodeByName(nodes_data, input_name)         node_road = getNodeByName(nodes_data, input_name)
         if (not node_road):         if (not node_road):
-            print SCRIPT_NAME, "ERROR Node", input_name, "is not in nodes_data"+            print(SCRIPT_NAME, "ERROR Node", input_name, "is not in nodes_data")
             return []             return []
          
Line 73: Line 73:
         pixelsize = dataset.GetGeoTransform()[1]         pixelsize = dataset.GetGeoTransform()[1]
          
-        print SCRIPT_NAME, "pixelsize:", pixelsize+        print(SCRIPT_NAME, "pixelsize:", pixelsize)
          
         road_cells = [];         road_cells = [];
Line 82: Line 82:
                 road_cells.append(cell);                 road_cells.append(cell);
                            
-        print SCRIPT_NAME, "There are", len(road_cells), "cells that are roads"+        print(SCRIPT_NAME, "There are", len(road_cells), "cells that are roads")
          
         distances=[]         distances=[]
Line 104: Line 104:
          
         for i in range(CELLS_PRINTING):         for i in range(CELLS_PRINTING):
-            print SCRIPT_NAME, "cell:", i, ":" ,  new_nodes_data[0]['data'][i]+            print(SCRIPT_NAME, "cell:", i, ":" ,  new_nodes_data[0]['data'][i])
                  
          
calculate_distance.txt · Last modified: 2023/04/21 15:48 by irladmin