Improve navigation graph rendering
This commit is contained in:
		
							parent
							
								
									f569d1302c
								
							
						
					
					
						commit
						452c7b9586
					
				|  | @ -3,10 +3,10 @@ | ||||||
| import network from "../src/tam/network.json"; | import network from "../src/tam/network.json"; | ||||||
| 
 | 
 | ||||||
| console.log("digraph {"); | console.log("digraph {"); | ||||||
| console.log("graph[layout=fdp, outputorder=nodesfirst]"); | console.log("graph[layout=neato, overlap=scalexy, splines=true, outputorder=nodesfirst]"); | ||||||
| 
 | 
 | ||||||
| for (const [stopId, stop] of Object.entries(network.stops)) { | for (const [stopId, stop] of Object.entries(network.stops)) { | ||||||
|     console.log(`${stopId}[label="${stop.properties.name}"]`); |     console.log(`${stopId}[label="${stop.properties.name}", shape=box]`); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| const junctions = new Set(); | const junctions = new Set(); | ||||||
|  | @ -28,9 +28,8 @@ for (const junction of junctions) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| for (const [beginId, begin] of Object.entries(network.navigation)) { | for (const [beginId, begin] of Object.entries(network.navigation)) { | ||||||
|     for (const [endId, end] of Object.entries(begin)) { |     for (const endId in begin) { | ||||||
|         const len = end.properties.length; |         console.log(`${beginId} -> ${endId}`); | ||||||
|         console.log(`${beginId} -> ${endId}[len=${len}]`); |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -30302,6 +30302,43 @@ | ||||||
|                         ] |                         ] | ||||||
|                     ] |                     ] | ||||||
|                 } |                 } | ||||||
|  |             }, | ||||||
|  |             "2577354951": { | ||||||
|  |                 "type": "Feature", | ||||||
|  |                 "properties": { | ||||||
|  |                     "begin": "1540234613", | ||||||
|  |                     "end": "2577354951", | ||||||
|  |                     "length": 60.443359137445206 | ||||||
|  |                 }, | ||||||
|  |                 "geometry": { | ||||||
|  |                     "type": "LineString", | ||||||
|  |                     "coordinates": [ | ||||||
|  |                         [ | ||||||
|  |                             3.8228084, | ||||||
|  |                             43.630625 | ||||||
|  |                         ], | ||||||
|  |                         [ | ||||||
|  |                             3.8227325, | ||||||
|  |                             43.6306264 | ||||||
|  |                         ], | ||||||
|  |                         [ | ||||||
|  |                             3.8223147, | ||||||
|  |                             43.6306342 | ||||||
|  |                         ], | ||||||
|  |                         [ | ||||||
|  |                             3.8221605, | ||||||
|  |                             43.6306371 | ||||||
|  |                         ], | ||||||
|  |                         [ | ||||||
|  |                             3.8220931, | ||||||
|  |                             43.6306383 | ||||||
|  |                         ], | ||||||
|  |                         [ | ||||||
|  |                             3.8220578, | ||||||
|  |                             43.6306408 | ||||||
|  |                         ] | ||||||
|  |                     ] | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|         }, |         }, | ||||||
|         "1540234616": { |         "1540234616": { | ||||||
|  | @ -38509,6 +38546,68 @@ | ||||||
|             } |             } | ||||||
|         }, |         }, | ||||||
|         "2577354951": { |         "2577354951": { | ||||||
|  |             "1540234613": { | ||||||
|  |                 "type": "Feature", | ||||||
|  |                 "properties": { | ||||||
|  |                     "begin": "2577354951", | ||||||
|  |                     "end": "1540234613", | ||||||
|  |                     "length": 60.443359137445206 | ||||||
|  |                 }, | ||||||
|  |                 "geometry": { | ||||||
|  |                     "type": "LineString", | ||||||
|  |                     "coordinates": [ | ||||||
|  |                         [ | ||||||
|  |                             3.8220578, | ||||||
|  |                             43.6306408 | ||||||
|  |                         ], | ||||||
|  |                         [ | ||||||
|  |                             3.8220931, | ||||||
|  |                             43.6306383 | ||||||
|  |                         ], | ||||||
|  |                         [ | ||||||
|  |                             3.8221605, | ||||||
|  |                             43.6306371 | ||||||
|  |                         ], | ||||||
|  |                         [ | ||||||
|  |                             3.8223147, | ||||||
|  |                             43.6306342 | ||||||
|  |                         ], | ||||||
|  |                         [ | ||||||
|  |                             3.8227325, | ||||||
|  |                             43.6306264 | ||||||
|  |                         ], | ||||||
|  |                         [ | ||||||
|  |                             3.8228084, | ||||||
|  |                             43.630625 | ||||||
|  |                         ] | ||||||
|  |                     ] | ||||||
|  |                 } | ||||||
|  |             }, | ||||||
|  |             "3123039805": { | ||||||
|  |                 "type": "Feature", | ||||||
|  |                 "properties": { | ||||||
|  |                     "begin": "2577354951", | ||||||
|  |                     "end": "3123039805", | ||||||
|  |                     "length": 20.081156918367746 | ||||||
|  |                 }, | ||||||
|  |                 "geometry": { | ||||||
|  |                     "type": "LineString", | ||||||
|  |                     "coordinates": [ | ||||||
|  |                         [ | ||||||
|  |                             3.8220578, | ||||||
|  |                             43.6306408 | ||||||
|  |                         ], | ||||||
|  |                         [ | ||||||
|  |                             3.8219998, | ||||||
|  |                             43.63064 | ||||||
|  |                         ], | ||||||
|  |                         [ | ||||||
|  |                             3.8218084, | ||||||
|  |                             43.6306444 | ||||||
|  |                         ] | ||||||
|  |                     ] | ||||||
|  |                 } | ||||||
|  |             }, | ||||||
|             "3123039810": { |             "3123039810": { | ||||||
|                 "type": "Feature", |                 "type": "Feature", | ||||||
|                 "properties": { |                 "properties": { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue