Transforming coordinates from oblique mercator

Nov 28, 2008 at 12:40 PM
Hi all

I tried to transform coordinates from the swiss coordinate system to the projection used in virtual earth and google maps. Was using the following code to initialize a coordinate transformation:


                CoordinateTransformationFactory ctFact = new CoordinateTransformationFactory();

                CoordinateSystemFactory csFact = new CoordinateSystemFactory();
               
                ICoordinateSystem csWgs84Sphere = csFact.CreateFromWkt(CS_WGS84_SPHERICAL);
                ICoordinateSystem csCh1903 = csFact.CreateFromWkt(CS_CH1903_WKT);

                ICoordinateTransformation cTrans = ctFact.CreateFromCoordinateSystems(
                    csCh1903, csWgs84Sphere);


This leads to the NotSupportedException: "Projection Hotine_Oblique_Mercator is not supported.";

What would be required for proj.net to support transforming coordinates from oblique mercator? Or is there simply an error in the code?

Thanks
Oliver

WKT Representation of the swiss coordinate system I used:

PROJCS
["CH1903_LV03",GEOGCS["GCS_CH1903",
DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],
PROJECTION["Hotine_Oblique_Mercator"],
PARAMETER["False_Easting",600000],
PARAMETER["False_Northing",200000],
PARAMETER["Scale_Factor",1],
PARAMETER["Azimuth",90],
PARAMETER["Longitude_Of_Center",7.439583333333333],
PARAMETER["Latitude_Of_Center",46.95240555555556],
UNIT["Meter",1],AUTHORITY["EPSG","21781"]]
Coordinator
Nov 30, 2008 at 8:18 AM
You would have to create a new IMathTransform class the contains the code to transform between geographic and projected coordinates.
Mar 9, 2009 at 11:52 PM
Edited Mar 9, 2009 at 11:53 PM
I just submitted a patch for review which would implement the Hotine_Oblique_Mercator projection.