Free Support Forum - aspose.com

Attribute with Null Date Prevents Feature Read


#1

I have just starting experimenting with Aspose.GIS (19.1) and cannot read many of my ShapeFiles.

The attached simple ShapeFile created in ESRI ArcMap, loads fine in ArcMap, ArcGIS Pro, and QGIS. But it throws an exception when iterating through the two features in Aspose.GIS. It is caused by a date that is set to NULL.

 Aspose.Gis.GisException: The field has an invalid value for a date.

Looking into it, ArcMap seems to use different bytes to represent NULL at different times. Other applications handle these differences just fine, so I think this is a bug in the Aspose.GIS parsing code.

UnreadableDateAttribute.zip (750 Bytes)


#2

@DavidB,

Thank you for contacting Aspose Support.

We were able to reproduce the issue reported by you and have logged a ticket in our issue tracking system as GISNET-282 to investigate it further. We will update you here as soon as additional information is available.


#3

For anyone interested in how this corrupt ShapeFile was generated.

Works

  • In ESRI ArcMap create a ShapeFile with a date attribute column.
  • Add features. Leave date attribute null.
  • Aspose.GIS can read this file.

Breaks

  • In ArcMap modify ShapeFile. Add a second date column.
  • Aspose.GIS cannot read this file any longer.

ArcMap uses different bytes to represent null values in the second, newly created date attribute column.


#4

@DavidB,

Thank you for sharing these details.

We have logged these details against the ticket shared earlier. We will update you here as soon as additional information regarding the issue resolution is available.


#5

The issues you have found earlier (filed as GISNET-282) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by muhammadahmad