I have this error "Object reference not set to an instance of an object." on this line of my code :
var dataSource = MemoryDataSource.CreateFromPBFStream(new FileInfo(@"G:\CCP\FrenchRoads.pbf").OpenRead());
StackTrace :
Error Form2 OnLoad : at OsmSharp.Osm.PBF.Streams.PBFOsmStreamSource.Reset()
at OsmSharp.Osm.Data.Memory.MemoryDataSource.CreateFrom(OsmStreamSource sourceStream)
at OsmSharp.Osm.Data.Memory.MemoryDataSource.CreateFromPBFStream(Stream stream)
at CCP.Form2.OnLoad(EventArgs e) in G:\CCP\Form2.cs:line 82
Hi Ben,
I have this error "Object reference not set to an instance of an object." on this line of my code :
var dataSource = MemoryDataSource.CreateFromPBFStream(new FileInfo(@"G:\CCP\FrenchRoads.pbf").OpenRead());
StackTrace : Error Form2 OnLoad : at OsmSharp.Osm.PBF.Streams.PBFOsmStreamSource.Reset() at OsmSharp.Osm.Data.Memory.MemoryDataSource.CreateFrom(OsmStreamSource sourceStream) at OsmSharp.Osm.Data.Memory.MemoryDataSource.CreateFromPBFStream(Stream stream) at CCP.Form2.OnLoad(EventArgs e) in G:\CCP\Form2.cs:line 82
My code works with an old version of OSMSharp
Thank for your work and your help.
NeoXeo