I have a shape file, I want to read and convert, but I get an Aspose.Gis.GisException “The field has an invalid value for a 32-bit integer”.
The message seems to be correct, I guess, because I get similar messages from other products. There really seems to be an error in the file.
But, is there a way to tell aspose.gis to read the file nevertheless? That would be more helpful than not reading it at all.
Unfortunately, there is no way to tell Aspose.GIS to skip reading errors in this case. Moreover, your shapefile seems to be valid and we found an issue on our side that leads to the error message. We are working on a fix. Issue ID is GISNET-458.
@gustavg, we’ve released Aspose.GIS version 19.8.1 that contains a fix for the issue. Please let me know if there are any other difficulties in working with shapefiles using Aspose.GIS.
@gustavg,
We reproduced the issue and working on a fix. Issue ID is GISNET-461.
Just in case, the issue we found is related to reading GeoJSON files, not about conversion from ShapeFile to GeoJSON:
// This conversion works fine
VectorLayer.Convert(attachedShapefilePath, Drivers.Shapefile, geoJsonPath, Drivers.GeoJson);
// Exception is thrown during reading the GeoJSON file
using (var layer = VectorLayer.Open(geoJsonPath, Drivers.GeoJson))
{
// ---
}