I am migrating a mapguide 2008 site to mapguide 2009 which has been developed as a mash-up with microsoft virtual earth. As part of the migration I had to re-code a few lines (shown below) due the mgcoordinateSystem.dll being removed in 2009.
//Previous code used for Mapguide 2008
MgCoordinateSystemTransform coordTransform = new MgCoordinateSystemTransform(VECoordSys, featureCoordsys);
///new code used in Mapguide 2009
MgCoordinateSystemFactory coordTransFactory = new MgCoordinateSystemFactory();
MgCoordinateSystemTransform coordTransform = coordTransFactory.GetTransform(VECoordSys, featureCoordsys);
With the VEcoordSys and featureCoordsys values being set as OGC WKT strings as follows:
VEcoordSys = {GEOGCS["LL84",DATUM["WGS 84",SPHEROID["WGS 84",6378137,298.25722293287],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["Degrees",0.01745329252]]}
featureCoordsys = {PROJCS["TM65.IrishNationalGrid",GEOGCS["TM65.LL",DATUM["TM65",SPHEROID["AIRY-MOD",6377340.189,299.32496546],TOWGS84[506.0000,-122.0000,611.0000,0.000000,0.000000,0.000000,0.00000000]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["false_easting",200000.000],PARAMETER["false_northing",250000.000],PARAMETER["scale_factor",1.000035000000],PARAMETER["central_meridian",-8.00000000000000],PARAMETER["latitude_of_origin",53.50000000000000],UNIT["Meter",1.00000000000000]]}
This works fine in mapguide 2008 however using the same source and target coordinate systems in Mapguide 2009 cause a shift in a south-westerly direction of the data. On further investigation I have noticed Mapguide 2009 appears to disregard the TOWGS84 rotation element of the WKT and instead modifies the coordinate systems to tbe following:
VEcoordSys = {GEOGCS["LL84",DATUM["WGS84",SPHEROID["WGS84",6378137.000,298.25722293]],PRIMEM["Greenwich",0],UNIT["Degree",0.01745329251994]]}
featureCoordsys = {PROJCS["TM65.IrishNationalGrid",GEOGCS["",DATUM["",SPHEROID["AIRY-MOD",6377340.189,299.32496546]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["false_easting",200000.000],PARAMETER["false_northing",250000.000],PARAMETER["scale_factor",1.000035000000],PARAMETER["central_meridian",-8.00000000000000],PARAMETER["latitude_of_origin",53.50000000000000],UNIT["Meter",1.00000000000000]]}
I've been struggling to resolve this over the past few days and would be grateful for any advice.
Cheers,
Dan