ThinkGeo.com    |     Documentation    |     Premium Support

Programmatically detect Geometry type contained in a Shapefile

I would like to be able to programmatically detect the geometry type (point, line, area,...) which a shapefile contains.  How would I do this with C# code?


Rod



Rod,


Thanks for your post and questions. Following API shows how to get the type of the geometries in the shape file. Hope it helps.

ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(@"");
ShapeFileType shapeType = worldLayer.GetShapeFileType();

Any more questions please feel free to let me know.
Thanks.
Yale