Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. convert xy coordinate to latlong

convert xy coordinate to latlong

Scheduled Pinned Locked Moved Visual Studio
csharpvisual-studiohelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rahul1983
    wrote on last edited by
    #1

    Hello can anybody help me to convert xy coordinate to latitude and longitude in visual studio.net. pls give me the code or explanation for this.

    J 1 Reply Last reply
    0
    • R rahul1983

      Hello can anybody help me to convert xy coordinate to latitude and longitude in visual studio.net. pls give me the code or explanation for this.

      J Offline
      J Offline
      Jarno Burger
      wrote on last edited by
      #2

      Just use some math and convert this code into the other direction: Private Function LaLo_to_XYZ(ByVal Lattitude As Double, ByVal Longitude As Double) As XYZ Dim POS As XYZ 'bereken de afstand van het gegeven punt naar het midden toe , van bovenaf gezien... Dim radianLat As Double = (90 - Lattitude) * Math.PI / 180 Dim straal As Double = Math.Sin(radianLat) * StraalDome POS.Z = -(Math.Cos(radianLat) * StraalDome) 'bereken de longitude positie erboven op Dim radianLon As Double = Longitude * Math.PI / 180 POS.Y = Math.Sin(radianLon) * straal POS.X = Math.Cos(radianLon) * straal Return POS End Function To point your more in the right way First change your distance from center of the ball to a radius of 1.=>to get a new xyz point. Then calculate the triangle that lies flat on the table to get the degrees. Then calculate the triangle that stands up/down-wards on the triangle mentioned before.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups