There are so many permutations of questions I've tried to find the answer to my question from various sources, but I have yet to actually find an answer the way that makes sense to me (and works).
I'm using ArcObjects in a ArcMap add-in, and I have shape file loaded with sample data that comes in a Projected Coordinate System.
I want to convert a feature's points (IPoint) which are X/Y coordinates, into it's BASE GCS Lat/Lon values.
The Data Source in the Shape File shows (Custom since Factory Code shows ZERO):
Projected Coordinate System: NAD27_BLM_3N_ftUS Projection: Transverse_Mercator false_easting: 1640416.67000000 false_northing: 0.00000000 central_meridian: -165.00000000 scale_factor: 0.99960000 latitude_of_origin: 0.00000000 Linear Unit: Foot_US
Geographic Coordinate System: GCS_North_American_1927 Datum: D_North_American_1927 Prime Meridian: Greenwich Angular Unit: Degree
And I want to convert the X/Y coordinates to be Lat/Lon instead with GCS NAD 27.
There is no transformation, it's the same Datum.
I have tried to use the following code:
IPoint geographicPoint = new Point(); geographicPoint.X = _pcsX; geographicPoint.Y = _pcsY; geographicPoint.Z = _z; geographicPoint.M = _m; geographicPoint.SpatialReference = _inputSpatialReference; // PCS ISpatialReference outputSpatialReference = SpatialReference.GenerateSpatialReference(outputCoordinateSystemWKID, false); // GCS ((IGeometry2)geographicPoint).ProjectEx(outputSpatialReference, esriTransformDirection.esriTransformReverse, null, false, 0, 0); _gcsLat = geographicPoint.Y; _gcsLong = geographicPoint.X;
I have also tried to use the Project() method as well instead of ProjectEx:
however, in both cases, I just get the exact same X/Y coordinates in the X/Y values of the geographicPoint, when I am expecting the X/Y values to now be the Long/Lat as I have requested the output coordinate system that is a Geographic Coordinate System.
X: 2440016.02472701 Y: 25980973.0785536
After Projection to 4267:
LAT: 25980973.0785536 LON: 2440016.02472701
Can anyone help?
As Requested: the PRJ file of the input document: PROJCS["NAD27_BLM_3N_ftUS",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],UNIT["Foot_US",0.30480060960121924]]