Questions tagged [geolocation]

Geolocation is the identification of the real-world geographic location of an object, such as a cell phone or an Internet-connected computer terminal. Use [w3c-geolocation] for questions about the W3C Geolocation API.

Geolocation is closely related to positioning but can be distinguished from it by a greater emphasis on determining a meaningful location (e.g. a street address) rather than just a set of geographic coordinates. Specifically this involves the use of advanced RF location systems utilising, for example, Time Difference Of Arrival (TDOA) where greater specificity of location is possible. TDOA systems often utilise mapping displays or other graphical information system. This is in contrast to more traditional radio location technologies, for example Direction Finding where a line of bearing to a transmitter is achieved and not the specific location.

In terms of the internet and computer geolocation can be performed by associating a geographic location with the Internet Protocol (IP) address, MAC address, RFID, hardware embedded article/production number, embedded software number (such as UUID, Exif/IPTC/XMP or modern steganography), invoice, Wi-Fi connection location, or device GPS coordinates, or other, perhaps self-disclosed information. Geolocation usually works by automatically looking up an IP address on a WHOIS service and retrieving the registrant's physical address.

IP address geolocation data can include information such as country, region, city, postal/zip code, latitude, longitude and timezone. Deeper data sets can determine other parameters such as domain name, connection speed, ISP, language, proxies, company name, US DMA/MSA, NAICS codes, and home/business.

The word geolocation is also used in other contexts to refer to the process of inferring the location of a tracked animal based, for instance, on the time history of sunlight brightness or the water temperature and depth measured by an instrument attached to the animal. Such instruments are commonly called archival tags or dataloggers.


Useful links


Related tags

12397 questions
155
votes
12 answers

How to get visitor's location (i.e. country) using geolocation?

I'm trying to extend the native geolocation function if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var latitude = position.coords.latitude; var longitude = position.coords.longitude; …
Gal
  • 23,122
  • 32
  • 97
  • 118
149
votes
13 answers

Calculating new longitude, latitude from old + n meters

I want to create 2 new longitude and 2 new latitudes based on a coordinate and a distance in meters, I want to create a nice bounding box around a certain point. It is for a part of a city and max ±1500 meters. I therefore don't think the curvature…
Ben
  • 13,297
  • 4
  • 47
  • 68
149
votes
6 answers

Simple calculations for working with lat/lon and km distance?

Is there a simple calculation I can do which will convert km into a value which I can add to a lat or lon float to calculate a bounding box for searches? It doesn't need to be completely accurate. For instance: if I were given a lat/lon for London,…
Phillip B Oldham
  • 18,807
  • 20
  • 94
  • 134
142
votes
10 answers

Where am I? - Get country

An android mobile actually does know quite well where it is - but is there a way of retrieving the country by something like a country code? No need of knowing the exact GPS position - the country is sufficient I first thought of using the time…
DonGru
  • 13,532
  • 8
  • 45
  • 55
132
votes
3 answers

How to get current location in Android

I'm having troubles of getting my current position coordinates using the NETWORK provider of android location system. Already read a lot of tutorials and implemented 4 or 5 existing classes to my project and all of them are giving me the last…
Boris Pawlowski
  • 1,781
  • 4
  • 16
  • 22
122
votes
11 answers

Google Maps: how to get country, state/province/region, city given a lat/long value?

I need a list of countries, states & cities based on a collection of lat/long values I have. I need to store this information in a manner that hierarchy is preserve and without duplicates (e.g. "USA" and "United States" and "United States of…
StackOverflowNewbie
  • 39,403
  • 111
  • 277
  • 441
121
votes
7 answers

How accurately should I store latitude and longitude?

I was reading this question here: What datatype to use when storing latitude and longitude data in SQL databases? And it seems the general consensus is that using Decimal(9,6) is the way to go. The question for me is, how accurate do I really need…
Citizen
  • 12,430
  • 26
  • 76
  • 117
114
votes
9 answers

How does Google calculate my location on a desktop?

Right this is confusing me quite a bit, i'm not sure if any of you have noticed or used the "my location" feature on google maps using your desktop (or none GPS/none mobile device). If you have a browser with google gears (easiest to use is Google…
Shadi Almosri
  • 11,678
  • 16
  • 58
  • 80
113
votes
8 answers

android webview geolocation

I have to retrieve a user's location in a WebView. I do this with the following Javascript: function getLocation() { navigator.geolocation.getCurrentPosition(displayLocation, handleError); } But the permission request popup never opens. I've set…
Ste
  • 2,116
  • 7
  • 24
  • 24
110
votes
9 answers

Get the distance between two geo points

I want to make an app which checks the nearest place where a user is. I can easily get the location of the user and I have already a list of places with latitude and longitude. What would be the best way to know the nearest place of the list against…
Chmouel Boudjnah
  • 2,541
  • 3
  • 24
  • 28
107
votes
3 answers

Why use the SQL Server 2008 geography data type?

I am redesigning a customer database and one of the new pieces of information I would like to store along with the standard address fields (Street, City, etc.) is the geographic location of the address. The only use case I have in mind is to allow…
Jeff Ogata
  • 56,645
  • 19
  • 114
  • 127
104
votes
15 answers

Location Manager Error : (KCLErrorDomain error 0)

Location Manager Error : Operation could not be completed(KCLErrorDomain error 0) Why does this error occur?
Mike
100
votes
4 answers

If I have ACCESS_FINE_LOCATION already, can I omit ACCESS_COARSE_LOCATION?

I have a GPS app that already requests ACCESS_FINE_LOCATION permission in the manifest, now I want to add a library (MoPub) that requires ACCESS_COARSE_LOCATION. Am I correct in assuming that ACCESS_FINE_LOCATION is enough, and I can leave out…
charliefortune
  • 3,072
  • 5
  • 28
  • 48
97
votes
10 answers

Algorithm to find all Latitude Longitude locations within a certain distance from a given Lat Lng location

Given a database of places with Latitude + Longitude locations, such as 40.8120390, -73.4889650, how would I find all locations within a given distance of a specific location? It doesn't seem very efficient to select all locations from the DB and…
Val Schuman
  • 1,798
  • 2
  • 18
  • 23
92
votes
17 answers

Get Country of IP Address with PHP

Ideally I'm trying to put together a PHP script that I can query from any web browser and it returns the country of the IP address that accessed the PHP script. Is this possible or is there a better solution?
Tristan
  • 3,845
  • 5
  • 35
  • 58