I am trying to build an index file programmatically for a shape file when it is uploaded. However, I seem to be getting the dreaded "The input double value is out of range. maxX". Does anybody have a solution to this issue? My shape file is projected in NAD_1983_UTM_Zone_15N. Is there anything special I need to do in this case? The shape files do seem to be created although I am not sure if they are correct or not.
Below is the code that I am using:
Proj4Projection proj4Projection = this.getProjection();
proj4Projection.Open();
//ShapeFileFeatureLayer.BuildIndexFile(path + this.shapeFileName, path + this.shapeFileName.Split(new char[] { '.' }, 1)[0] + ".idx", proj4Projection, BuildIndexMode.DoNotRebuild);
ShapeFileFeatureLayer.BuildIndexFile(path + this.shapeFileName, BuildIndexMode.DoNotRebuild);
ShapeFileFeatureLayer layer = new ShapeFileFeatureLayer(path + this.shapeFileName, ShapeFileReadWriteMode.ReadOnly);
layer.RequireIndex = true;
layer.FeatureSource.Projection = proj4Projection;
layer.Name = this.shapeFileDescription;
layer.ZoomLevelSet.ZoomLevel01.IsActive = true;
layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Thanks
Curtis