This project has moved. For the latest updates, please go here.

NULL Shape Problem

Topics: General Topics
Aug 21, 2006 at 7:49 PM
I was running into problems using MsSql.CreateDataTable(). Turns out the shapefile I was loading had at least one shape with 0 parts. I tracked things down to ShapeFile.cs, Ln 723 where ShapeFile.ReadGeometry() returns null when a shape with 0 parts is encountered. The null shape in turn kills MsSql.CreateDataTable(). I've added a work-around with this at MsSql.cs, Ln 543:

// Skip NULL shapes.
if (feature.Geometry == null)

But I'm not sure if this is a bug or a feature so I'll leave it to the community to decide.

Aug 21, 2006 at 9:45 PM
Thanks for posting this.
I've checked in an updated MsSql.CreateDataTable() to the repository.
Let me know if it solves your problem.