itinero / routing

The routing core of itinero.
Apache License 2.0
220 stars 70 forks source link

System.IndexOutOfRangeException: Index was outside the bounds of the array. #322

Open Johnny-Zhangzhao opened 3 years ago

Johnny-Zhangzhao commented 3 years ago

Hi guys,

I was trying to build the routing index files of "North America" (Pbf downloaded at https://download.geofabrik.de/north-america-latest.osm.pbf) , it runs into 2 problems:

  1. Error: "out of memory" when I was using a "8 Cores" and "64 GB RAM" AWS EC2 Windows Instance. Anybody knows why so much memory is required? The *.pbf file is only 9.5GB.

  2. To work the "out of memory" around, I changed the machine's RAM to "128 GB", now everything goes well, but when at the stage of "Preprocessing ... 96%", I get the following error:

routing build issue

Here are the codes I was using:

OsmStreamSource osmStream = new PBFOsmStreamSource(File.OpenRead(sourceFilename));
var routerDb = new RouterDb();
routerDb.LoadOsmData(osmStreams, carProfile);
routerDb.AddContracted(carProfile.Fastest(), true);

using (var stream = File.Open(@"d:\na.routerdb", FileMode.Create))
{
        contracted.Serialize(stream);
}

The good news is that all is fine with a state, for example, "Iowa". Any information will be appreciated!

Regards, Johnny