Friday, July 27, 2007

The Microsoft Live Maps and Google Maps projection

Ah! I must have caused confusions with my last post "Which projection to use...". There is a new post on SharpGIS that specifically writes about which coordinate systems should be used when working with vector/path coordinates and which one should be used when working with images (like creating overlays) - in hopes of clearing up this confusion. Obviously I was confused as to why the Mercator projection was not working when I tried converting my coordinates to KML. After all in Morten's post, he writes that GoogleEarth and VirtualEarth use the mercator projection. When I converted my UTM coordinates to the coordinate system provided on Morten's post - I got values way outside Lat/Long ranges. From testing I found that the WGS_84 based GeogCS worked in converting my data-set, so I declared "In ArcGIS one should use this CS to output vector coordinates"! - Well that is only partially true! The full truth - no matter which GIS app you are using - if you are converting coordinates of paths, polygons, etc. (vectors) - then you should convert to the geographic coordinate system based on WGS84. This is defined by the WKT string: GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] The mapping app will internally convert the geographic coordinates to the correct coordinate system, which is the Spherical Mercator projection based CS. If instead you need to create an image overlay - then you use Morten's Spherical Mercator Coordinate System which is defined by the WKTString: PROJCS["Mercator Spheric", GEOGCS["WGS84based_GCS", DATUM"WGS84based_Datum",SPHEROID["WGS84based_Sphere", 6378137, 0], TOWGS84[0, 0, 0, 0, 0, 0, 0]], PRIMEM["Greenwich", 0, AUTHORITY["EPSG", "8901"]], UNIT["degree", 0.0174532925199433, AUTHORITY["EPSG", "9102"]], AXIS["E", EAST], AXIS["N", NORTH]], PROJECTION ["Mercator"], PARAMETER["False_Easting", 0], PARAMETER["False_Northing", 0], PARAMETER["Central_Meridian", 0], PARAMETER["Latitude_of_origin", 0], UNIT["metre", 1, AUTHORITY["EPSG", "9001"]], AXIS["East", EAST], AXIS["North", NORTH]] The difference in handling vectors and rasters differently probably has to do with the computational requirements for projecting rasters on the fly - which is a lot more intensive than just projecting individual coordinates provided as parts of paths or polygons or points.

No comments: