Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to have certain code such that given the latitude and longitude as input, I want to get the continent which it belongs to? I know I can manually read the coordinates and then see that from the map. But is there an easier way to do it?

I don't need a visualization. I just need a kind of function that returns the name of the continent

share|improve this question
What are your tolerance limits? A quick and dirty solution could be to use the corners of a rectangle that encloses each continent and check to see if the coordinates are within the range of each corner but that solution will likely result in errors near borders. – Kevin Dec 16 '12 at 21:38
2  
What software are you using? – whuber Dec 16 '12 at 21:57
1  
Possible duplicate of gis.stackexchange.com/questions/30254/… – BradHards Dec 17 '12 at 2:09
In addition to the sugegstion made by @Kevin, you also need to maintain the bounding box for each continent and compare the co-ordinate with all the bounding boxes to get the continent. Though, you need to consider the boundary conditions for an effective solution. – ujjwalesri Dec 17 '12 at 5:52

closed as not a real question by iant, whuber Dec 18 '12 at 15:03

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

Browse other questions tagged or ask your own question.