jeffs1
asked on
Geometrical algorithm
Can anyone provide me with an example of an algorithm to do the following conversion:
Input:
Latitude / longitude coordinate on earth's surface
Zoom level (from full world to a few miles across)
X/Y pixel width of PC screen
Asusming this lat/lon point on earth is being viewed form a point in space perfectly Normal to the earth's suface:
Output:
The X/Y point on the screen that the given input Lat/lon point maps to, given the above input data for zoom level and screen resolution.
I would also need a way to detremine if the lat/lon point is on the visible or hidden half of the earth (this is easy), and if hidden, figure out the last visible x/y point on the path from the previous visible point to the hidden point (more difficult).
Basically looking to map the spherical coordinates to rectangular coordinates.
Jeff
Input:
Latitude / longitude coordinate on earth's surface
Zoom level (from full world to a few miles across)
X/Y pixel width of PC screen
Asusming this lat/lon point on earth is being viewed form a point in space perfectly Normal to the earth's suface:
Output:
The X/Y point on the screen that the given input Lat/lon point maps to, given the above input data for zoom level and screen resolution.
I would also need a way to detremine if the lat/lon point is on the visible or hidden half of the earth (this is easy), and if hidden, figure out the last visible x/y point on the path from the previous visible point to the hidden point (more difficult).
Basically looking to map the spherical coordinates to rectangular coordinates.
Jeff
What sort of projection?
ASKER
If I were to come up with the algorithm, I would be answering my ownb question... I cna do this, but I was hoping to take advantage of someone elses's experience here who make have done this already...
I am not looking for any particular projection (as in the paper world)... I have described above all necessary input criteria for the algorithm... just looking at the earth from a point in space normal to the surface of the earth.
Jeff
I am not looking for any particular projection (as in the paper world)... I have described above all necessary input criteria for the algorithm... just looking at the earth from a point in space normal to the surface of the earth.
Jeff
"Just looking at the earth from a point in space normal to the surface of the earth."
Does it matter which point in space?
Does it matter which point in space?
ASKER
Points in space along a vector "Normal" to the surface of the earth are all on a single line from the earth to infinity. The point along the line that you are at is determined by the zoom level.
One presumes two input coordinates were intended - the stated observation point and the implied query point.
Also, it seems to me as if altitude IS needed. After all, there's lots more below the horizon at 10km than at 1000km.
Also, it seems to me as if altitude IS needed. After all, there's lots more below the horizon at 10km than at 1000km.
ASKER
Yes altitude is necessary... I was calling it Zoom level, but input is the same...
you also need to take 'angle of vision' into account, i.e. what proportion of a persons vision the pc monitor represents.
Dear expert(s),
A request has been made to close this Q in CS:
https://www.experts-exchange.com/questions/20488805/Delete-questions.html
Without a response in 72 hrs, a moderator will finalize this question by:
- Saving this Q as a PAQ and refunding the points to the questionner
When you agree or disagree, please add a comment here.
Thank you.
modulo
Community Support Moderator
Experts Exchange
A request has been made to close this Q in CS:
https://www.experts-exchange.com/questions/20488805/Delete-questions.html
Without a response in 72 hrs, a moderator will finalize this question by:
- Saving this Q as a PAQ and refunding the points to the questionner
When you agree or disagree, please add a comment here.
Thank you.
modulo
Community Support Moderator
Experts Exchange
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Babu