private static IGeometryDef CreateGeometryDef( esriGeometryType geometryType, [NotNull] ISpatialReference spatialReference, double gridSize1, double gridSize2, double gridSize3, bool hasZ, bool hasM) { IGeometryDefEdit result = new GeometryDefClass(); ISpatialReference highPrecisionSpatialReference; SpatialReferenceUtils.EnsureHighPrecision(spatialReference, out highPrecisionSpatialReference); result.GeometryType_2 = geometryType; result.HasZ_2 = hasZ; result.HasM_2 = hasM; result.SpatialReference_2 = highPrecisionSpatialReference; ConfigureSpatialIndexGrid(result, gridSize1, gridSize2, gridSize3); return(result); }