This project is read-only.

Mercator, Logical, and Screen coordinates.

Nov 18, 2008 at 6:38 PM
Hello. First of all... Great project! Is this control going to be available as part of a future, standard Silverlight release? Just wanted to clear that up.

Okay, here's my question(s):

1) The Mercator coordinate system, the system used to map a globe to a plane, is this essentially how Virtual Earth maps things to its map (ie. geo-locations)?
2) What is a Logical coordinate?
3) How can I get a PushPin's Screen coordinates?

As you can see i am trying to understand Virtual Earth / Deep Earth's coordinate systems.
Is there documentation or references i can read up on to understand how this works?
Perhaps a quick summary would help as well, because walking thru the source code isn't necessarily trivial.

Thanks everyone. And keep up the good work!
Look forward to the first release...
-ed209
Nov 18, 2008 at 11:42 PM
Hey Ed.  This is one of the trickiest areas to get your head around.  It took me a while, so I'll try to help out with some quick answeres:
  1. Yes, VE uses Mercator and so do most other online maps. Probably because the right angle nature of Mercator fits well with our right angle of our computer screens.
  2. Logical Coordinate is a refering to a point on the Deep Zoom (MutliScaleImage).  It ranges from Point(0,0) in the upper left to Point(1,1) in the bottom right.  For a comparison, here are the coordinates of a screen at 800 x 600 where the map is shown in full view:
                         Screen                  Logical              Geographic

Upper Left        Point(0,0)            Point(0,0)          Point(-85.05..., 180)
CenterPoint       Point(400,300)    Point(0.5,0.5)    Point(0, 0)
Lower Right      Point(800,600)    Point(1,1)          Point(85.05..., -180)

You can convert any coordinate system to another by using the API's on Map.DisplayTransform.  So for the pushpin screen coord you would do someting like this:   Point pixel = map.GeographicToScreen(pin.Point);

To learn more try searching "Map Projections".  Lots of good stuff out there.  When you have a good handle on that, search on "Deep Zoom" to see what you'll find.

Hope that helps,

~Rick




   
Nov 18, 2008 at 11:48 PM

Thanks Rick.

I understand most of what you explained, except for one critical thing.

In that chart you drew out, how did you get the geographic coordinates?

Those (x,y) values just seem arbitrary to me.

And yes, I did see the map.GeographicToScreen(Point) utility method before. But when I tried to use it I noticed that the screen coordinates returned (pixel coord’s) do not line up with the PushPin (the input Point). I tested this by drawing a shape (in screen coord’s) using the returned coordinates from the said method. So in sum, this didn’t seem like the conversion I was looking for.

Thanks!

Nov 18, 2008 at 11:59 PM
For a primer on geographic coordinates, check out this Wikipedia article here.  The pushpin point is Geographic, so make sure anything you set as Point is in the form of a geo point.