I have an MXD file with 240 feature-layers, all having the exact same spatial-reference and spatial resolution. I checked this using the following code:

var sortedLayers = allLayers.OfType<IGeoFeatureLayer>().Select(x =>
    var featureClass = (IGeoDataset) x.FeatureClass;
    return new
        LayerName = x.Name,
        FeatureClass = featureClass,
        Resolution = ((ISpatialReferenceResolution) featureClass.SpatialReference).XYResolution[false]
}).OrderBy(x => x.Resolution);

This returns 0.00001 for every layer within my map. However when I query the XYResolution for my map I get a really weird number:


This code returns 0.0000000024426994295885463. First I thought it is a rounding-issue. But the returned resolution is not even near the expected resolution of the layers. In fact the nearest decimal that can be represented as binary is 0.00000953674, which is 0.0000000000000000101 (=2^-17 + 2^-19). As far as I know the maps resolution is picked from the layers within that map. However there´s no direct way to query a layer's spatial reference and thus its resolution, as the SpatialReference-property on ILayer is write-only.

Has ayone an idea why the map's resolution is different from my layer's resolution?

The spatial reference of all my layers - or more accurate of their feature-classes - is DE_DHDN_3GK2, which is a German Cartesian coordinate-system on a Bessel elipsoid having metric units. In fact pretty similar to UTM32, however not in tranversal projection. From ArcCatalog:

Berechtigung: Benutzerdefiniert

Projection: Gauss_Kruger
False_Easting: 2500000,0
False_Northing: 0,0
Central_Meridian: 6,0
Scale_Factor: 1,0
Latitude_Of_Origin: 0,0
Linear Unit: Meter (1,0)

Geographic Coordinate System: GCS_Deutsches_Hauptdreiecksnetz
Angular Unit: Degree (0,0174532925199433)
Prime Meridian: Greenwich (0,0)
Datum: D_Deutsches_Hauptdreiecksnetz
  Spheroid: Bessel_1841
    Semimajor Axis: 6377397,155
    Semiminor Axis: 6356078,962818189
    Inverse Flattening: 299,1528128
  • Resolution of a data source can be impacted by on-the-fly reprojection. Data precision is far more likely to be e+01 or higher. – Vince Dec 2 '19 at 12:01
  • @Vince Do you really mean the data-source-projection changes based on the map? That would be annoying, and I doubt that´s what happens. In particular ESRI-docs about the layers SpatialReference-property say: "This property is only used for map display, setting this property does not change the spatial reference of the layer's underlying data." (desktop.arcgis.com/en/arcobjects/latest/net/…). – HimBromBeere Dec 2 '19 at 12:03
  • @Vince Anyway: what do you mean by "desktop.arcgis.com/en/arcobjects/latest/net/…"? When I look into the datasets spatial-reference I get 0.00001m, which is exactly what I expected. e+01 would be pretty low resolution. – HimBromBeere Dec 2 '19 at 12:06
  • If the the data is in UTM meters and the map in degrees, retaining the resolution value would reduce precision by six orders of magnitude. You haven't provided sufficient details to understand the issue. Name the exact spatial references involved. – Vince Dec 2 '19 at 12:09
  • Submillimeter precision is silly since even centimeter accuracy in map data is unlikely. And mapping objects 100 meters across like superhighways only compounds the issue. – Vince Dec 2 '19 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.