Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 8 of 8

converting lat lon to x y

This is a discussion on converting lat lon to x y within the MapPoint Desktop Discussion forums, part of the Map Forums category; I have a jpeg of a mappoint map. The jpeg shows a picture of a polygon. What I want to ...

  1. #1
    Dazzer is offline Senior Member Green Belt
    Join Date
    Sep 2003
    Posts
    103

    converting lat lon to x y

    I have a jpeg of a mappoint map. The jpeg shows a picture of a polygon.

    What I want to know is given that I know the length and width of the jpeg (in pixels) and the coordinates of the polygon (in lat lon). How could I convet the lat lon coordinates to x y pixel coordinates.

    What i'm trying to do is show an this image in a vb .net form and then overlay the image using GDI+ with an interactive polygon. The problem I obviously have is knowing where to plot my polygon.

    Any ideas would be greatly appreciated.

    Thanks

  2. #2
    Mark - MSFT is offline Junior Member Yellow Belt
    Join Date
    Dec 2005
    Posts
    22

    X,Y conversion

    Are you using MapPoint 2006, or the MapPoint Web Service? If it is the web service, there is a function to handle convert to lat/long which is pretty nice. Once you save a map off in MapPoint 2006 (or earlier) there's not really any way to reference it again from within the COM interface, it's just a gif without a bounding reference. Perhaps someone else has done a hack to workaround this, but I don't know of anyway to do it.

    Mark M - MSFT

  3. #3
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    You can use XYToLocation to convert x,y pixel coordinates to a Location object, and LocationToX and LocationToY to find the x,y pixel coordinates from a Location object.

    If I have understeand your question then I think this should be enough to do what you wants to do.

  4. #4
    Dazzer is offline Senior Member Green Belt
    Join Date
    Sep 2003
    Posts
    103
    Not quite what I need to do but it has given me an idea. Thanks for your help

  5. #5
    lfdmike's Avatar
    lfdmike is offline Member Green Belt
    Join Date
    May 2004
    Posts
    56
    Blog Entries
    7

    Re: converting lat lon to x y

    I know its a late reply.

    It sounds like you have a image of a map and you know the co-ordinates of the 4 corners.
    You also know the dimensions of the map image
    It sounds like a matter of dividing the change of degrees by the pixels to determine how many degrees (or portions thereof) are passed per pixel

    The map linked to below is from MP2002, and the target location is placed using a similiar technique
    Map
    Last edited by lfdmike; 11-07-2007 at 04:58 PM. Reason: changed from img to url tag

  6. #6
    map_info is offline Junior Member White Belt
    Join Date
    Aug 2008
    Posts
    1

    Re: converting lat lon to x y

    Hi ,

    I want to plot a point in a map when lattitude and longitude is given.

    I have a .jpg image and i know some of the x y cordinates lattitude and longitude. No other information is available. Now i will be given with a lattiude and longitude and then i have to calculate the x y in the .jpeg image with.

    Do any of you have some formulas or techinques to do this.

    Please help me

    Regards
    Anish Mathew

  7. #7
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: converting lat lon to x y

    Hi,

    depends on the zoom factor and projection of the image. but if you know 2 points on x as and also on y as then you can calculate the latitude/longitude per pixel in both directions.

  8. #8
    vbMapMark is offline Junior Member White Belt
    Join Date
    Feb 2009
    Posts
    1

    Re: converting lat lon to x y

    Quote Originally Posted by Wilfried View Post
    Hi,

    depends on the zoom factor and projection of the image. but if you know 2 points on x as and also on y as then you can calculate the latitude/longitude per pixel in both directions.

    I know this post is really ol but I hav been searching evry where for this ....

    You say if I know 2 points to the X axis and 2 to the y axis I could then calculate the lat/lon per pixel in both directions

    So if I understand correctly .... then this is what I am wanting to do ...

    I want know many more lat/lon of several points in both x and y positions ..

    I would like to then be able to select any point lets say of a given x,y coordinate then and figure its lat/lon value ... cane be done Yes?

    If so .... I am doing this in vb 2008 express ... If I could see the equation or its vb example either ... I could then write this so it will do exactly what we are talking about .....

    All help is much appreciated ......

    Mark

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Converting to PDF for large printing
    By jhnywall in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 09-14-2010, 08:44 AM
  2. Converting my Windows app. to ASP
    By BobFromBoston in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 10-17-2005, 12:43 PM
  3. Converting XY to Lat Long
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-22-2004, 02:35 AM
  4. Converting a route to waypoints
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 06-04-2003, 12:27 PM
  5. Converting Zip Codes to Lat/Long
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 06-01-2003, 12:27 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91