Пример #1
0
        private ISpatialReference GetUniqueErrorFeatureClassSpatialReference()
        {
            ISpatialReference result = null;

            foreach (IssueDatasetWriter issueWriter in GetIssueWriters())
            {
                if (issueWriter.SpatialReference == null)
                {
                    continue;
                }

                if (result == null)
                {
                    result = issueWriter.SpatialReference;
                }
                else
                {
                    const bool compareTolerances = false;
                    if (!SpatialReferenceUtils.AreEqualXYZ(result,
                                                           issueWriter.SpatialReference,
                                                           compareTolerances))
                    {
                        throw new InvalidOperationException(
                                  "The spatial references of all issue feature classes " +
                                  "(including xy and z precision and tolerances) must be equal");
                    }
                }
            }

            return(Assert.NotNull(result, "spatialReference"));
        }