[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 994
  • Last Modified:

Convert from Latitude and Longitude to X/Y in Mercator Projection

I need code (pseudo code or any C-like language) to convert in Mercator Projection (the one used in Google Maps):
- from geographic latitude/longitude to map X/Y (given the size of the map)
- from map X/Y (given its size) to latitude/longitude
0
nrpg666
Asked:
nrpg666
  • 2
  • 2
1 Solution
 
nrpg666Author Commented:
I already tried myself with these formulas. I might be crappy mathematician or it could be of the late hour here, but anyway - I couldn't get them to work. That was the reason to ask for code, not formulas...
0
 
ozoCommented:
what was the code you tried?
0
 
nrpg666Author Commented:
The code is OK, the result was [0, pi), I didn't notice that for the time being. I thought something like [0, 1) .
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now