Changed Regionhashing and OsmDatastructure with OsmDatastructure.Graph
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
using System.Globalization;
|
||||
using System.Xml;
|
||||
using OSMDatastructure;
|
||||
using OSMImporter;
|
||||
using OSMDatastructure.Graph;
|
||||
|
||||
namespace Server;
|
||||
|
||||
@ -39,10 +39,10 @@ public static class XmlImporter
|
||||
public static HashSet<Region> SplitIntoRegions(HashSet<OsmNode> nodes)
|
||||
{
|
||||
Console.WriteLine(string.Format("[{0}] Splitting into Regions...", DateTime.Now.ToLocalTime()));
|
||||
Dictionary<ulong, Region> retRegions = new();
|
||||
Dictionary<int, Region> retRegions = new();
|
||||
foreach (OsmNode node in nodes)
|
||||
{
|
||||
ulong regionHash = node.coordinates.GetRegionHash();
|
||||
int regionHash = Coordinates.GetRegionHashCode(node.coordinates);
|
||||
if(retRegions.ContainsKey(regionHash))
|
||||
{
|
||||
retRegions[regionHash].nodes.Add(node);
|
||||
@ -62,7 +62,7 @@ public static class XmlImporter
|
||||
{
|
||||
NumberDecimalSeparator = "."
|
||||
};
|
||||
private static HashSet<ulong> GetHighwayNodeIds(XmlReader xmlReader)
|
||||
public static HashSet<ulong> GetHighwayNodeIds(XmlReader xmlReader)
|
||||
{
|
||||
HashSet<ulong> retSet = new();
|
||||
bool isHighway;
|
||||
|
Reference in New Issue
Block a user