question about Global Positioning (lat & long)

Community Forums/General Help/question about Global Positioning (lat & long)

Santiworld(Posted 2009) [#1]
I wondered if there was any way of knowing if cordenadas to enter latitude and longitude, a function returns me the data on which country is that point?

in my program, i place a point in the world..
the programs know the latittude and longitude
i wan't to know, what country are there

someone know how can i do that whitout have a internet connection? :)


Gabriel(Posted 2009) [#2]
What you're asking about is known as reverse geocoding. The Google Maps API can do it, but you would need an Internet connection for that.

http://groups.google.com/group/Google-Maps-API/web/resources-non-google-geocoders

Without an Internet connection, well that doesn't sound fun.


Agamer(Posted 2009) [#3]
As you only need the country all you should need a series of coordinates at least one for each country. You can then take your readings and compare them to your list of coordinates and see what it's closest to and that should be the country your in.

To look up the coordinates for your list you could most likely use the Google maps API.


nawi(Posted 2009) [#4]
You can then take your readings and compare them to your list of coordinates and see what it's closest to and that should be the country your in.

That algorithm will be pretty damn buggy in Europe.


Agamer(Posted 2009) [#5]
I considered that, hence upping the density of points in places like Europe. Should serve to be pretty accurate there will be errors but it depends what will be acceptable, depends upon what application you'll be using it for.

The alternate approach is to have a trace of the borders of a country with there corresponding GPS coordinates. If the reading is within this confined area your in that country. Getting the data for that though will be more challenging.

What are you trying to do with this information it might make the advice given a bit more appropriate.


Santiworld(Posted 2009) [#6]
:) thanks!..

yes, maybe with some predeterminated points, capitals or colors, i can detect the country, is for a race car game, i don't need exactly data..

anyway, i go to search info about that data :)


Agamer(Posted 2009) [#7]
Glad to be of help any more questions feel free to ask.


Brucey(Posted 2009) [#8]
If you want accuracy, there are "free" GIS shapefiles available online with political boundaries.

And, if you were using BlitzMax, I could help you with extracting the information... otherwise, you'll need to find other tools. :-)