0

Is there a way to add the datum information to a layout using dynamic text in ArcMap. I am aware that the properties of the CRS can be added, including the datum name using but I am looking for the properties of the datum itself, ie the spheroid, semimajor axis, semiminor axis, and flattening. This information is provided in the coordinate system tab of the data frame properties but I cannot work out how to extract it using dynamic text.

The help topic (http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Working_with_dynamic_text/00s900000013000000/) shows the necessary text for lots of information about the CRS but not this

EDIT: I am using version 10.5 (10.5.0.6491)

1
  • Please Edit the question to specify the version of ArcGIS in use. If it is 10.0 as the documentation link indicates please specify the service pack (there were five); if it is a release that hasn't been retired, please look for the documentation which matches the version you are using (to reduce confusion).
    – Vince
    Commented Apr 16, 2019 at 11:09

1 Answer 1

1

Maybe there is a simpler solution but if not you could add this information to a field in the attribute table of your index layer. Then use this field as Insert - Dynamic Text - Data Driven Page Attribute. The field can be calculated using properties of a spatialReference Object:

import arcpy
fc = r'someWGS84data2' #Change
field_to_update = 'crsinfo' #Change

def givecrsinfo(some_feature_class):
    spatref = arcpy.Describe(some_feature_class).spatialReference
    return 'Spheroid: {0}, Semimajor axis: {1}, Semiminor axis: {2}, Flattening:{3}'.format(spatref.spheroidName, spatref.semiMajorAxis, spatref.semiMinorAxis, spatref.flattening)

with arcpy.da.UpdateCursor(fc,field_to_update) as cursor:
    for row in cursor:
        row[0] = givecrsinfo(fc)
        cursor.updateRow(row)

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.