public IssueRepository([NotNull] IssueRowWriter rowWriter, [NotNull] IEnumerable <IssueFeatureWriter> featureWriters, [NotNull] IIssueTableFields fields, [NotNull] IFeatureWorkspace featureWorkspace) { Assert.ArgumentNotNull(rowWriter, nameof(rowWriter)); Assert.ArgumentNotNull(featureWriters, nameof(featureWriters)); Assert.ArgumentNotNull(fields, nameof(fields)); Assert.ArgumentNotNull(featureWorkspace, nameof(featureWorkspace)); FeatureWorkspace = featureWorkspace; _rowWriter = rowWriter; _featureWriters = featureWriters.ToList(); _issueWritersByGeometryType = GetIssueWritersByGeometryType(rowWriter, _featureWriters); _issueDatasets = GetIssueDatasets(rowWriter, _featureWriters, fields); if (_featureWriters.Count > 0) { _spatialReference = SpatialReferenceUtils.GetUniqueSpatialReference( GetSpatialReferences(_featureWriters), comparePrecisionAndTolerance: true, compareVerticalCoordinateSystems: true); } }
public IssueGeodatabaseCreator([NotNull] IFeatureWorkspace featureWorkspace, [NotNull] IIssueTableFieldManagement fields, [CanBeNull] ISpatialReference spatialReference, double gridSize1 = 0d, double gridSize2 = 0d, double gridSize3 = 0d) { Assert.ArgumentNotNull(featureWorkspace, nameof(featureWorkspace)); Assert.ArgumentNotNull(fields, nameof(fields)); _featureWorkspace = featureWorkspace; _fields = fields; _rowWriter = CreateRowWriter(IssueDatasetUtils.RowClassName, featureWorkspace, fields, LocalizableStrings.IssuesStandaloneTableName); if (spatialReference != null) { var spatialReferenceCopy = (ISpatialReference)((IClone)spatialReference).Clone(); if (!spatialReferenceCopy.HasZPrecision()) { SpatialReferenceUtils.SetZDomain(spatialReferenceCopy, -10000, 100000, 0.0001, 0.001); } _featureWriters.Add( CreateFeatureWriter( IssueDatasetUtils.PolygonClassName, featureWorkspace, fields, esriGeometryType.esriGeometryPolygon, spatialReferenceCopy, gridSize1, gridSize2, gridSize3, LocalizableStrings.RawIssuesLayerName_Polygon)); _featureWriters.Add( CreateFeatureWriter( IssueDatasetUtils.PolylineClassName, featureWorkspace, fields, esriGeometryType.esriGeometryPolyline, spatialReferenceCopy, gridSize1, gridSize2, gridSize3, LocalizableStrings.RawIssuesLayerName_Polyline)); _featureWriters.Add( CreateFeatureWriter( IssueDatasetUtils.MultipointClassName, featureWorkspace, fields, esriGeometryType.esriGeometryMultipoint, spatialReferenceCopy, gridSize1, gridSize2, gridSize3, LocalizableStrings.RawIssuesLayerName_Multipoint)); _featureWriters.Add( CreateFeatureWriter( IssueDatasetUtils.MultiPatchClassName, featureWorkspace, fields, esriGeometryType.esriGeometryMultiPatch, spatialReferenceCopy, gridSize1, gridSize2, gridSize3, LocalizableStrings.RawIssuesLayerName_MultiPatch)); } }
private static IList <IIssueDataset> GetIssueDatasets( [NotNull] IssueRowWriter rowWriter, [NotNull] IEnumerable <IssueFeatureWriter> featureWriters, [NotNull] IIssueTableFields fields) { var result = new List <IIssueDataset> { new IssueTable(rowWriter, fields) }; foreach (IssueFeatureWriter featureWriter in featureWriters) { result.Add(new IssueFeatureClass(featureWriter, fields)); } return(result); }
GetIssueWritersByGeometryType( [NotNull] IssueRowWriter rowWriter, [NotNull] IEnumerable <IssueFeatureWriter> featureWriters) { var result = new Dictionary <esriGeometryType, IssueWriter> { { esriGeometryType.esriGeometryNull, rowWriter } }; foreach (IssueFeatureWriter featureWriter in featureWriters) { result.Add(featureWriter.GeometryType, featureWriter); } return(result); }
public IssueTable([NotNull] IssueRowWriter issueWriter, [NotNull] IIssueTableFields fields) : base(issueWriter, fields) { _issueWriter = issueWriter; }