System.IndexOutOfRangeException: Index was outside the bounds of the array.
Johnny-Zhangzhao opened this issue · 0 comments
Johnny-Zhangzhao commented
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:
-
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.
-
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:
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