Questions tagged [geocoding]

Geocoding is a method to find the coordinates (e.g. latitude and longitude) of a data record (e.g. an address or zip code) or of an object which represents some other geographic data (e.g. country name, landmark, etc).

Geocoding is the process of finding associated geographic coordinates (often expressed as latitude and longitude) from other geographic data, such as street addresses, or ZIP codes (postal codes). With geographic coordinates the features can be mapped and entered into Geographic Information Systems, or the coordinates can be embedded into media such as digital photographs via geotagging.

The opposite, , is finding a textual location (such as a street address), from geographic coordinates.

A common use case is to find a record based on given address data - like city name, zip code, street name and house number or special points of interest - in a geo database which holds information about longitude, latitude or nodes in a road network for each address record.

Geocoding in software programs is often either supported as an interactive dialog based process, as an automatic batch process for geocoding mass data or a combination of both methods. Geocoding can be a highly sophisticated task as it often has to deal with unstructured or poorly structured address data and ambiguous or localized representations of addresses. The quality of geocoding results depends not only on the underlying geo database but also on the quality of string parsing and search algorithms which try to find a matching record as unambiguously as possible.

Geocoding is an important feature in - for example - Geographic Information Systems (GIS), Navigation Systems, Route Planning or Transport Management Systems.

The process of adding geographical identification metadata to various media such as photographs or videos, websites, SMS messages, QR codes, or RSS feeds. This data usually consists of latitude and longitude coordinates, though they can also include altitude, bearing, distance, accuracy data, and place names.


Useful links


Related tags

3226 questions
399
votes
8 answers

What datatype to use when storing latitude and longitude data in SQL databases?

When storing latitude or longitude data in an ANSI SQL compliant database, what datatype would be most appropriate? Should float be used, or decimal, or ...? I'm aware that Oracle, MySql, and SQL Server have added some special datatypes specifically…
dthrasher
  • 40,656
  • 34
  • 113
  • 139
323
votes
23 answers

This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console

I have a latitude, and longitude : "-27.0000,133.0000". I want produce a map base on that. I've tried go to this link https://maps.googleapis.com/maps/api/geocode/json?latlng=-27.0000,133.0000&key=****** I keep getting this error on the browser…
code-8
  • 54,650
  • 106
  • 352
  • 604
277
votes
12 answers

Getting distance between two points based on latitude/longitude

I tried implementing the formula in Finding distances based on Latitude and Longitude. The applet does good for the two points I am testing: Yet my code is not working. from math import sin, cos, sqrt, atan2 R = 6373.0 lat1 = 52.2296756 lon1 =…
gwaramadze
  • 4,523
  • 5
  • 30
  • 42
185
votes
13 answers

Measuring the distance between two coordinates in PHP

Hi I have the need to calculate the distance between two points having the lat and long. I would like to avoid any call to external API. I tried to implement the Haversine Formula in PHP: Here is the code: class CoordDistance { public $lat_a =…
maxdangelo
  • 3,063
  • 5
  • 21
  • 25
177
votes
15 answers

Calculating Distance between two Latitude and Longitude GeoCoordinates

I'm calculating the distance between two GeoCoordinates. I'm testing my app against 3-4 other apps. When I'm calculating distance, I tend to get an average of 3.3 miles for my calculation whereas other apps are getting 3.5 miles. It's a big…
Jason N. Gaylord
  • 7,910
  • 15
  • 56
  • 95
167
votes
16 answers

Given the lat/long coordinates, how can we find out the city/country?

For example if we have these set of coordinates "latitude": 48.858844300000001, "longitude": 2.2943506, How can we find out the city/country?
meow
  • 27,476
  • 33
  • 116
  • 177
126
votes
17 answers

How to calculate the bounding box for a given lat/lng location?

I have given a location defined by latitude and longitude. Now i want to calculate a bounding box within e.g. 10 kilometers of that point. The bounding box should be defined as latmin, lngmin and latmax, lngmax. I need this stuff in order to use the…
Michal
  • 3,141
  • 5
  • 27
  • 29
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
118
votes
14 answers

How can I get city name from a latitude and longitude point?

Is there a way to get a city name from a latitude and longitude point using the google maps api for javascript? If so could I please see an example?
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
90
votes
7 answers

How do I Geocode 20 addresses without receiving an OVER_QUERY_LIMIT response?

Using the Google Geocoder v3, if I try to geocode 20 addresses, I get an OVER_QUERY_LIMIT unless I time them to be ~1 second apart, but then it takes 20 seconds before my markers are all placed. Is there any other way to do it, other than storing…
Michiel van Oosterhout
  • 22,839
  • 15
  • 90
  • 132
83
votes
8 answers

Timezone lookup from latitude longitude

Is there any library (or even better, web service) available which can convert from a latitude/longitude into a time zone?
Matt Sheppard
  • 116,545
  • 46
  • 111
  • 131
81
votes
2 answers

How, exactly does HTML5's GeoLocation work?

I know the browser shares my IP address and details of nearby wireless networks to determine my location, but what sort of info does it know about nearby wifi networks? For example, where I live are no public wireless networks, and from my home I…
Dan
  • 811
  • 1
  • 7
  • 3
76
votes
12 answers

How can I measure distance and create a bounding box based on two latitude+longitude points in Java?

I am wanting to find the distance between two different points. This I know can be accomplished with the great circle distance. http://www.meridianworlddata.com/Distance-calculation.asp Once done, with a point and distance I would like to find the…
will
  • 1,175
  • 4
  • 17
  • 20
75
votes
18 answers

How to convert an address to a latitude/longitude?

How would I go about converting an address or city to a latitude/longitude? Are there commercial outfits I can "rent" this service from? This would be used in a commercial desktop application on a Windows PC with fulltime internet access.
swilc0x
  • 1,021
  • 1
  • 11
  • 7
1
2 3
99 100