Project the point [-117, 34] from WGS 84 (4326) to Web Mercator (102113)

Jul 19, 2012 at 1:15 PM

I modified the example code to project the point.
Reference :


//Sets up a array to contain the x and y coordinates
            double[] xy = new double[2];
            xy[0] = -117;
            xy[1] = 34;
            //An array for the z coordinate
            double[] z = new double[1];
            z[0] = 1;
            //Defines the starting coordiante system
            ProjectionInfo pStart = ProjectionInfo.FromEpsgCode(4326);
            //Defines the ending coordiante system
            ProjectionInfo pEnd = ProjectionInfo.FromEpsgCode(102113);
            //Calls the reproject function that will transform the input location to the output locaiton
            Reproject.ReprojectPoints(xy, z, pStart, pEnd, 0, 1);
            MessageBox.Show("The points have been reporjected.");

Expected Output
X: -13024380.422813
Y: 4028802.02613441

But i am getting this error
ArgumentOutofRange Exception
Specified argument was out of the range of valid values.
Parameter name: Authority Code not found.

Jul 19, 2012 at 5:34 PM

I would guess your code is not in AuthorityCodeToProj4.ds

You might be able to add it to AdditionalProjections.proj4

Jul 26, 2012 at 7:46 PM

Kindly provide me more details... I am unable to perform this operation.

Jul 27, 2012 at 8:15 AM

Please have a look at