I want to do something like the following:
class SubClassOfSpatialReference(arcpy_spatial_reference_object): def __init__(self, input_data): ... etc.
Can I even do this? If so, what exactly is the parent object that I need to provide in the class definition? If you type() a spatial reference object, you get arcpy.arcobjects.arcobjects.SpatialReference. I tried that and got AttributeError: 'module' object has no attribute 'arcobjects'. No surprise, really. I imagine that there is also a problem with the fact that the arcpy SpatialReference class invocation takes an argument of a WKID, spatial reference name, or feature dataset from which to copy the spatial reference; there isn't any way to create a new, blank spatial reference object.
Here's another thought: can one subclass an instance, as in:
starting in this case with the World_Mercator spatial reference?
I am obviously out of my immediate sphere of knowledge about such things, so I thank anyone who can point me in the right direction or give advice. What I am ultimately after is a convenient interface for a modifiable spatial reference. Contrary to ESRI documentation of the arcpy SpatialReference class, a majority of the properties are read-only. I figured that, if I could subclass the arcpy Spatial Reference class, then I could override the name(), standardParallel1(), etc. attributes and use WKT string manipulation to make the spatial reference modifiable. I suppose I could make a generic class that deals only with the WKT and implements a CreateSR() method that uses the loadFromString() method to make a spatial reference after all the properties have been set, but it just wouldn't be as slick.