This project has moved and is read-only. For the latest updates, please go here.

NULL Shape Problem

Topics: General Topics
Aug 21, 2006 at 8: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 10: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.