Compare commits
No commits in common. "4f98563a1e9b0bac0d3ca3657a6d9c2a4831f75c" and "c1d8f5e879f49b094bd33cb254bed3070924af13" have entirely different histories.
4f98563a1e
...
c1d8f5e879
@ -164,12 +164,12 @@ public class Converter(float regionSize, string? exportFolderPath = null, ILogge
|
||||
|
||||
public void RemoveAllNonHighways()
|
||||
{
|
||||
string[] wayRegionsPaths = Directory.GetFiles(Path.Join(ExportFolderPath, WaysRegionDirectory)).Where(file => Regex.IsMatch(file, @"[0-9]+")).ToArray();
|
||||
string[] wayRegionsPaths = Directory.GetFiles(Path.Join(ExportFolderPath, WaysRegionDirectory)).Where(file => !Regex.IsMatch(file, @"[0-9]+\..*")).ToArray();
|
||||
int count = 0;
|
||||
DateTime print = DateTime.Now;
|
||||
DateTime start = DateTime.Now;
|
||||
HashSet<ulong> wayIds = new();
|
||||
HashSet<ulong> nodeIds = new();
|
||||
List<ulong> wayIds = new();
|
||||
List<ulong> nodeIds = new();
|
||||
foreach (string path in wayRegionsPaths)
|
||||
{
|
||||
if (DateTime.Now - print > TimeSpan.FromSeconds(2))
|
||||
@ -198,8 +198,7 @@ public class Converter(float regionSize, string? exportFolderPath = null, ILogge
|
||||
{
|
||||
waysStreamWriter.WriteLine(line);
|
||||
wayIds.Add(w.ID);
|
||||
foreach (ulong nodeId in w.NodeIds)
|
||||
nodeIds.Add(nodeId);
|
||||
nodeIds.AddRange(w.NodeIds);
|
||||
hasWritten = true;
|
||||
}else
|
||||
logger?.LogTrace($"Way {w.ID} is not a highway. BYE!");
|
||||
|
Loading…
Reference in New Issue
Block a user