Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Geometrical algorithm

Posted on 2002-03-20
10
269 Views
Last Modified: 2012-05-04
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
0
Comment
Question by:jeffs1
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 2

Expert Comment

by:sateesh_babu
ID: 6885293
Why don't you come up with an small pseudo code or algorithm, and them ask about it rather than putting the homework assignment directly.

Babu
0
 
LVL 22

Expert Comment

by:cookre
ID: 6887250
What sort of projection?
0
 

Author Comment

by:jeffs1
ID: 6894606
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
0
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 84

Expert Comment

by:ozo
ID: 6894644
"Just looking at the earth from a point in space normal to the surface of the earth."

Does it matter which point in space?
0
 

Author Comment

by:jeffs1
ID: 6894657
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.
0
 
LVL 22

Expert Comment

by:cookre
ID: 6894766
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.
0
 

Author Comment

by:jeffs1
ID: 6907227
Yes altitude is necessary... I was calling it Zoom level, but input is the same...
0
 
LVL 18

Expert Comment

by:deighton
ID: 6925085
you also need to take 'angle of vision' into account, i.e. what proportion of a persons vision the pc monitor represents.
0
 

Expert Comment

by:modulo
ID: 7845257
Dear expert(s),

A request has been made to close this Q in CS:
http://www.experts-exchange.com/Community_Support/Q_20488805.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
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 7862408
Saving this Q as a PAQ and refunding the points to the questionner

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Coverting 24 hour time to 12 hour in C++ 15 178
Global Keyboard Hooks Blocked 4 81
Resolve Dependency Issues 4 79
Windows Server 2012 R2 - connect to computer 13 33
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question