Hi,
I can't load an shp file that has been modified within Quantum GIS.
I first generate my shp file from my DotSpatial project.
It has point and line layers.
If I then modify only the point layer (add labels, move labels...) within Quantum GIS, I can then call the addLayer method with success.
But if I modify the line layer by changing the shape of a line, then I can't add the line layer to the map.
When I try to call Map1.AddLayer("myFile.shp"), I get the following error :
Error #5
Cannot read past the end of the file.
Exception Source: DotSpatial.Data
Exception Target Site: AdvanceBuffer
Exception Location: à DotSpatial.Data.BufferedBinaryReader.AdvanceBuffer()
à DotSpatial.Data.BufferedBinaryReader.Read(Byte[] buffer, Int32 index, Int32 count)
à DotSpatial.Data.BufferedBinaryReader.ReadBytes(Int32 byteCount)
à DotSpatial.Data.BufferedBinaryReader.ReadInt32(Boolean isLittleEndian)
à DotSpatial.Data.LineShapefile.FillLines(String fileName, IProgressHandler progressHandler)
à DotSpatial.Data.LineShapefile.Open(String fileName, IProgressHandler progressHandler)
à DotSpatial.Data.Shapefile.OpenFile(String fileName, IProgressHandler progressHandler)
à DotSpatial.Data.Shapefile.OpenFile(String fileName)
à DotSpatial.Data.ShapefileDataProvider.Open(String fileName)
à DotSpatial.Data.ShapefileDataProvider.DotSpatial.Data.IDataProvider.Open(String fileName)
à DotSpatial.Data.DataManager.OpenFile(String fileName, Boolean inRam, IProgressHandler progressHandler)
à DotSpatial.Data.DataManager.OpenFile(String fileName)
à DotSpatial.Controls.MapLayerCollection.Add(String fileName)
à DotSpatial.Controls.Map.AddLayer(String fileName)
à Form_SHP.MajFlowShapeFile()-------------------------
Thanks in advance for any advise or help.
Maxence
I can't load an shp file that has been modified within Quantum GIS.
I first generate my shp file from my DotSpatial project.
It has point and line layers.
If I then modify only the point layer (add labels, move labels...) within Quantum GIS, I can then call the addLayer method with success.
But if I modify the line layer by changing the shape of a line, then I can't add the line layer to the map.
When I try to call Map1.AddLayer("myFile.shp"), I get the following error :
Error #5
Cannot read past the end of the file.
Exception Source: DotSpatial.Data
Exception Target Site: AdvanceBuffer
Exception Location: à DotSpatial.Data.BufferedBinaryReader.AdvanceBuffer()
à DotSpatial.Data.BufferedBinaryReader.Read(Byte[] buffer, Int32 index, Int32 count)
à DotSpatial.Data.BufferedBinaryReader.ReadBytes(Int32 byteCount)
à DotSpatial.Data.BufferedBinaryReader.ReadInt32(Boolean isLittleEndian)
à DotSpatial.Data.LineShapefile.FillLines(String fileName, IProgressHandler progressHandler)
à DotSpatial.Data.LineShapefile.Open(String fileName, IProgressHandler progressHandler)
à DotSpatial.Data.Shapefile.OpenFile(String fileName, IProgressHandler progressHandler)
à DotSpatial.Data.Shapefile.OpenFile(String fileName)
à DotSpatial.Data.ShapefileDataProvider.Open(String fileName)
à DotSpatial.Data.ShapefileDataProvider.DotSpatial.Data.IDataProvider.Open(String fileName)
à DotSpatial.Data.DataManager.OpenFile(String fileName, Boolean inRam, IProgressHandler progressHandler)
à DotSpatial.Data.DataManager.OpenFile(String fileName)
à DotSpatial.Controls.MapLayerCollection.Add(String fileName)
à DotSpatial.Controls.Map.AddLayer(String fileName)
à Form_SHP.MajFlowShapeFile()-------------------------
Thanks in advance for any advise or help.
Maxence