kuiperfoliage

Adjusting properties on the SpatialReference class

Discussion created by kuiperfoliage on Apr 6, 2012
Latest reply on Apr 10, 2012 by kuiperfoliage
Hi

I'm trying to adjust the SpatialReference using the SpatialReference class, but it doesn't seem to be working. In my example i'm trying to adjust the centralMeridian, but the final output still has the original value of -96.0.

Anybody has an idea how to make this work ?

Here is my example:

#!/usr/bin/env python

import arcpy, sys

Output_Spatial_Reference = "PROJCS['North_America_Lambert_Conformal_Conic',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-96.0],PARAMETER['Standard_Parallel_1',20.0],PARAMETER['Standard_Parallel_2',60.0],PARAMETER['Latitude_Of_Origin',40.0],UNIT['Meter',1.0]];-35214300 -28218500 10000;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision"

sr = arcpy.SpatialReference()
sr.loadFromString(Output_Spatial_Reference)
sr.centralMeridian = 10.0
result = sr.exportToString()

print "printing result:"
print result

Outcomes