Opened 13 years ago

Closed 12 years ago

#467 closed defect (fixed)

Display units as degrees shows incorrect x/y values in Fusion

Reported by: liuar Owned by: madair
Priority: P2 Milestone: Future
Component: Core Version: 2.0
Severity: Major Keywords:
Cc: Browser: All
External ID: 1368686.02 Operating System: All
state: Committed

Description

  1. Create a map definition with LL84 coordinate system.
  2. Navigate to a particular point and note down the lat long in degrees. The value I got is(43.7498, -87.7047)
  3. Change the coordinate system of the map to WGS84.PseudoMercator.
  4. Navigate to that point
  5. Change Display Units to 'Degrees' via the Options Menu
  6. Note down the lat long in degrees. It is: 49.08, -88.2988


Considerably different than before the map was reprojected.

Change History (3)

comment:1 by madair, 13 years ago

Status: newassigned

I think the core issue here is that the MapGuide WKT definition for WGS84.PseudoMercator in MapGuide is incorrect, at least it is not equivalent to the Google Spherical Mercator projection.

To test, I'm checking the intersection of New Jersey Ave and River Park Road (aka S. 17th St):

  • in Google Maps, the coordinates of the intersection is (-87.7307, 43.74652)
  • with Fusion, using default Sheboygan dataset in LL84, I get (-87.7307, 43.7465)
  • modifying the MapGuide "WGS84.PseudoMercator" projection so that the datum is spherical I get (-87.7307, 43.7465)
  • using the MapGuide "WGS84.PseudoMercator" projection unchanged gives (-87.7307, 43.9387), ie. shifted north/south

The WKT for the Google maps projection should be:

PROJCS["Popular Visualisation CRS / Mercator",GEOGCS["Popular Visualisation CRS",DATUM["Popular_Visualisation_Datum",SPHEROID["Popular Visualisation Sphere",6378137,0,AUTHORITY["EPSG","7059"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6055"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4055"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTIONMercator_1SP,PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3785"],AXIS["X",EAST],AXIS["Y",NORTH]]

Note the 0 as the second param of the spheroid which makes it a sphere. (this WKT also uses 'metre' as the unit rather than 'Meter' which causes other problems but that is another issue...)

Net result of this is that I believe Proj4js and Fusion are doing the correct things, and by calculating the point on an ellipsoid rather than a sphere, MapGuide is shifting the map in North South.

Comments please...

comment:2 by liuar, 13 years ago

Hi Mike,

Thanks for your reply. The wkt I got from MapGuide is

PROJCS["WGS84.PseudoMercator",GEOGCS["LL84",DATUM["WGS84",SPHEROID["WGS84",6378137.000,298.25722293]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Popular Visualisation Pseudo Mercator"],PARAMETER["false_easting",0.000],PARAMETER["false_northing",0.000],PARAMETER["central_meridian",0.00000000000000],UNIT["Meter",1.00000000000000]]

the second param is 298.25722293, I think this might be the problem. I will discuss this with our CS team and let you know the result. Great Thanks.

Regards,
Arthur

comment:3 by liuar, 12 years ago

External ID: 1368686.02
Resolution: fixed
state: NewCommitted
Status: assignedclosed

Fixed in Changeset [2465] Perform coordinate system transformation before displaying the cursor poistion.

Note: See TracTickets for help on using tickets.