Review free geocoding services

On this page we will review popular geocoding services.

Google Geocoding

1)  Connecting Google Geocoding:

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

Creating container:

<div id="map"></div>

Initializing a map:

var contentString = '<div id="content">Here there is all needed information</div>';
var infowindow = new google.maps.InfoWindow({
    content: contentString
});
var marker = new google.maps.Marker({
    position: myLatlng,
    map: map,
    title: 'Uluru (Ayers Rock)'
});
google.maps.event.addListener(marker, 'click', function() {
    infowindow.open(map,marker);
});
function initialize() {     
    var myLatlng = new google.maps.LatLng(-34.397, 150.644);
    var myOptions = {
        zoom: 8,
        center: myLatlng,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    var map = new google.maps.Map(document.getElementById("map"), myOptions); 
}
google.maps.event.addListener(marker, 'click', function() {   infowindow.open(map,marker); });//by clicking on the tag the window with information should be displayed on the map with reference to marker.

2) Format of query in order to find coordinates of object by its name. 3)  Reverse operation: to find an object by coordinates.

http://maps.googleapis.com/maps/api/geocode/json?latlng=55.75320193022759,37.61922086773683&sensor=false&language=ru

4) The answer will be obtained in form json or xml. More information about this and Google Geocoding in general here: https://developers.google.com/maps/documentation/geocoding/intro?hl=ru

5) The important factor is that Google Geocoding works with google maps only.


Yandex. Maps. Geocoding

Detailed documentation with examples here: https://tech.yandex.ru/maps/doc/geocoder/desc/examples/geocoder_examples-docpage/

Geocoding: https://geocode-maps.yandex.ru/1.x/?geocode=Москва,+Тверская+улица,+дом+7

Reverse geocoding: https://geocode-maps.yandex.ru/1.x/?geocode=E134.854,S25.828

These examples can be used directly in browser (the answer will be in xml). To obtain an answer in form json you need to add format=json https://geocode-maps.yandex.ru/1.x/?format=json&geocode=Москва, улица Новый Арбат, дом 24


Nominatim OpenStreetMap (http://wiki.openstreetmap.org/wiki/Nominatim)

It can be used as offline service.

Restrictions: one request  per second.

Coverage: most likely all countries from this list:  http://wiki.openstreetmap.org/wiki/Name_finder:Abbreviations

Supported query languages: languages of supported countries. Usage policy: https://wiki.openstreetmap.org/wiki/Nominatim_usage_policy

Documentation: https://wiki.openstreetmap.org/wiki/Nominatim

Examples:

  1. Geocoding: http://nominatim.openstreetmap.org/search/Unter%20den%20Linden%201%20Berlin?format=json&addressdetails=1&limit=1&polygon_svg=1
  2. Reverse geocoding: http://nominatim.openstreetmap.org/reverse?format=json&lat=52.5487429714954&lon=13.3978343993255&zoom=18&addressdetails=1

GEONAMES (http://www.geonames.org/about.html)

GEONAMES – geographic database.

Restrictions: 2000 requests  per hour. You have to create an account (in examples a test account was used).

Coverage: http://www.geonames.org/countries/

Supported query languages: languages of supported countries (described in coverage).

Usage policy: http://www.geonames.org/export/

Documentation: http://www.geonames.org/export/ws-overview.html

Examples:

Reverse geocoding: http://api.geonames.org/findNearbyJSON?lat=52.5487429714954&lng=13.3978343993255&username=GALIAF95 (as username the login of subscribed account is passed http://www.geonames.org/)


DATASCIENCETOOLKIT (http://www.datasciencetoolkit.org/)

A set of utilities for working with data based on open source services.

By default all queries use server http://www.datasciencetoolkit.org/ but you can rise up your own server (on the website there is an instruction with using vagrant  http://www.datasciencetoolkit.org/developerdocs#setup).

Restrictions: the same as Nominatim OpenStreetMap, description for Two Fishes is below Coverage: regions from GEONAMES and streets from OPENSTREETMAPS.

Supported query languages: languages of supported countries.

Documentation: http://www.datasciencetoolkit.org/developerdocs

Usage policy: MIT and GPL licenses.

Examples:

  1. Two Fishes geocoder (http://www.twofishes.net/) request (http://www.datasciencetoolkit.org/developerdocs#twofishes)
    1. Geocoding: http://www.datasciencetoolkit.org/twofishes?query=unter+den+linden
    2. Reverse geocoding: http://www.datasciencetoolkit.org/twofishes?ll=52.5487429714954,13.3978343993255
  2. Python (http://www.datasciencetoolkit.org/developerdocs#python)
    1. Geocoding (you can install via pip)
import dstk
dstk = dstk.DSTK()
dstk.street2coordinates('2543 Graystone Place, Simi Valley, CA 93065')

Two Fishes geocoder (http://www.twofishes.net/)

It can be used as offline service. Uses GEONAMES database (descriptions and links are above).

Restrictions: 100 requests per second for geocoding and 1000 requests  per second for reverse geocoding.

Coverage: the same as GEONAMES.

Supported query languages: languages of supported countries.

Usage policy: http://www.apache.org/licenses/LICENSE-2.0

Documentation: https://github.com/foursquare/twofishes/tree/master/docs

Examples:

  1. Geocoding: http://demo.twofishes.net/static/geocoder.html?query=unter+den+linden
  2. Reverse geocoding: http://demo.twofishes.net/static/geocoder.html?ll=52.5487429714954,13.3978343993255

OpenCage Geocoder (http://geocoder.opencagedata.com/)

API is the same as DATASCIENCETOOLKIT, uses various open source geocoding services, a little more modern.

You should to create an account (in examples key of test account is used).

Restrictions: 2500 requests  per day (http://geocoder.opencagedata.com/pricing.html).

Coverage: regions from GEONAMES and streets from OPENSTREETMAPS.

Supported query languages: languages of supported countries.

Usage policy: http://creativecommons.org/licenses/by-sa/3.0/

Documentation: http://geocoder.opencagedata.com/api.html

Examples:

  1. Geocoding: https://api.opencagedata.com/geocode/v1/json?query=unter+den+linden+berlin&key=5354ffde8d1d9fb5d53582a4a5dff911
  2. Reverse geocoding: https://api.opencagedata.com/geocode/v1/json?q=52.5487429714954+13.3978343993255&key=5354ffde8d1d9fb5d53582a4a5dff911

GISGRAPHY (https://github.com/gisgraphy/gisgraphyhttp://www.gisgraphy.com/)

It can be used as offline service.

Uses GEONAMES database (descriptions and links are above).

Restrictions: Gisgraphy server (core I7, 4Gb of memory):

Web service

Requests per second

Geocoding

40 req/s

Street/reverse geocoding

44 req/s

Find nearby

74 req/s

Fulltext

114 req/s

Address parser

196 req/s

Coverage: the same as GEONAMES.

Supported query languages: languages of supported countries.

Usage policy: http://www.gisgraphy.com/license.html

Documentation: http://www.gisgraphy.com/documentation/index.htm

Examples:

  1. Geocoding: http://services.gisgraphy.com//geocoding/geocode?address=unter+den+linden&couontry=DE&format=json
  2. Reverse geocoding: http://services.gisgraphy.com/reversegeocoding/search?format=json&lat=52.5487429714954&lng=13.3978343993255
ShareShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on VKEmail this to someone