Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am creating a shapefile programmatically using DotSpatial using the following example syntax / pseudo code

FeatureSet features = new FeatureSet(DotSpatial.Topology.FeatureType.Polygon);
features.DataTable.Columns.Add( … // add column names and types

foreach (var featureData in featurDataCollection) //loop adding many features
    IGeometry feature = …  // create feature with attribution + geometry

features.SaveAs(filepath, true);

I would like to ensure the output ShapeFile has a spatial index. Is there a way to do this programmatically in .Net, (preferably using the DotSpatial libraries).

It would appear that in my naiveté that I have asked a more difficult question than I thought. It seems that the .sbn format is not as open as the other shapefile formats and there has been some work on reverse engineering this. There also seems some mention of a C# implementation that creates .sbn files but I am still trying to figure this out.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.