Geocoding: Unterschied zwischen den Versionen
Stefan (Diskussion | Beiträge) K (→Geocoding APIs) |
Stefan (Diskussion | Beiträge) K (→Geocoding APIs) |
||
(26 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
− | + | The geocoding (geolocalization, DE:Geokodierung) is the process of finding associated geographic coordinates (e.g. latitude/longitude or northing/easting) from other geographic data, such as addresses (street name and street or building number), postal codes or place names. Since address data is a laborious data (like most geospatial data) and often copyrighted there is no single free solution or service. | |
+ | |||
+ | == Geocoding Data == | ||
+ | |||
+ | * Nominatim - [[OpenStreetMap]] place names: http://nominatim.osm.org/ | ||
+ | * OSMNames: http://osmnames.org/ | ||
+ | * Geonames.org: http://www.geonames.org/ | ||
+ | * Who's on first: https://whosonfirst.mapzen.com/ | ||
+ | * Quattroshapes by Foursquare (see e.g. https://allaroundgis.wordpress.com/2016/01/12/quattroshapes/ ) | ||
+ | * Alpha Shapes by Flickr.com | ||
+ | |||
+ | == Geocoding Systems == | ||
+ | |||
+ | There are many geocoding systems which try to refer to location without coordinates and without streetnames or housenumbers: See https://en.wikipedia.org/wiki/Geocoding . | ||
+ | |||
+ | '''Open Location Codes''' (OLC) are a promising way of encoding location into a form that is easier to use than latitude and longitude. They are designed to be used like street addresses, especially in places where buildings aren't numbered or street names do not exist. OLC stands for the technology including the publicly available specs and open source libraries. When speaking about a specific OLC code one can also call it "Plus code" or Short Code. | ||
+ | |||
+ | * Public OLC site (Doku. Forum etc.): http://www.openlocationcode.com/ | ||
+ | * OLC Github project (Wiki, z.B. Python): https://github.com/google/open-location-code/tree/master/python | ||
+ | * OLC/Plus Codes Demo site: http://plus.codes/ | ||
+ | * Presentation from main author Doug Rinckes: http://2017.stateofthemap.org/2017/open-source-street-addresses/ | ||
+ | |||
+ | Example: | ||
+ | "bQm Kulturcafé & Bar": | ||
+ | * Lat/Lon: 47.375938,8.546687 | ||
+ | * Plus Code (complete 10 codes): 8FVC9GGW+9M | ||
+ | * Plus Code (short code): 9GGW+9M | ||
+ | * Plus Code (shorter code with geoname): GW+9M Zürich | ||
+ | |||
+ | ---- | ||
+ | |||
+ | >> '''The section below is outdated and needs to be updated''' << | ||
+ | |||
+ | Given a local spreadsheet with not-yet-geocoded address data, there are following current solutions: | ||
+ | # ArcGIS Online or Google Fusion Tables (data source for both: Google): no programming, webbased service, data needs to be uploaded, needs Google or AGOL account => See [[ArcGIS Online]] and Esri Help Pages. | ||
+ | # Google Docs with App Script (data source: Google): predefined scripts, webbased service, data needs to be uploaded => See https://github.com/mapbox/geo-googledocs . | ||
+ | # Mapquest (data source: Nominatim/OpenStreetMap): predefined scripts, webbased service, data remains locally => See http://schoolofdata.org/handbook/recipes/geocoding/ . | ||
+ | # SpatiaLite (data source: MOPublic/Swiss Cadastre and Statistics): local sw, local data, predefined scripts. See [[SpatiaLite]]. | ||
== Geocoding im Web == | == Geocoding im Web == | ||
* Eine Adresse aufs Mal | * Eine Adresse aufs Mal | ||
+ | ** [http://nominatim.osm.org/ Nominatim] by [[OpenStreetMap]] (volunteering maintainers). | ||
+ | ** [https://mapzen.com/pelias/#loc=12,47.2029,8.9418 Pelias] by MapZen (and [[OpenStreetMap]] data) | ||
** [http://www.geocode.com/ Eagle (Geocode.com / Tele Atlas)] | ** [http://www.geocode.com/ Eagle (Geocode.com / Tele Atlas)] | ||
** [http://www.travelgis.com/geocode/ Geocoding Service - TravelGIS.com] (eine Adresse aufs Mal) | ** [http://www.travelgis.com/geocode/ Geocoding Service - TravelGIS.com] (eine Adresse aufs Mal) | ||
Zeile 12: | Zeile 51: | ||
== Geocoding APIs == | == Geocoding APIs == | ||
− | * 'Yahoo! PlaceFinder API' Service (Beschränkungen: mit API-Key; max. 50'000 Requests/Tag; Lizenz: ???) | + | * Online batch geocoder for journalists [https://geocode.localfocus.nl/ geocode.localfocus.nl]. |
+ | * '''OpenCage Geocoder [http://geocoder.opencagedata.com/]''' | ||
+ | * MapQuest Open Geocoding API Service ([http://developer.mapquest.com/web/products/open/geocoding-service]) (und weitere [http://developer.mapquest.com/web/products/dev-services/geocoding-ws]) (Beschränkungen: Gibt nur Ortschaft/Strasse zurück?; Lizenz: CC-BY-SA) | ||
+ | * Yahoo BOSS Geo Services (kostenpflichtig!) <s>'Yahoo! PlaceFinder API' Service (Beschränkungen: mit API-Key; max. 50'000 Requests/Tag; Lizenz: ???)</s> | ||
* 'Bing Maps APIs' (Beschränkungen: mit API-Key? unübersichtlich; Lizenz: ???). | * 'Bing Maps APIs' (Beschränkungen: mit API-Key? unübersichtlich; Lizenz: ???). | ||
− | |||
* [http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html Geoadmin API] (Beschränkungen: verschiedene; ?; Lizenz: Bund...???) | * [http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html Geoadmin API] (Beschränkungen: verschiedene; ?; Lizenz: Bund...???) | ||
* [http://www.geonames.org/export/web-services.html Geonames findNearestIntersectionOSM oder postalCodeSearch] (Beschränkungen: availability; Lizenz: "free"/CC-BY-SA) | * [http://www.geonames.org/export/web-services.html Geonames findNearestIntersectionOSM oder postalCodeSearch] (Beschränkungen: availability; Lizenz: "free"/CC-BY-SA) | ||
Zeile 21: | Zeile 62: | ||
** Geocoding "Oberseestrasse+10,Rapperswil-Jona,Switzerland": [http://tinygeocoder.com/create-api.php?q=Oberseestrasse+10,Rapperswil-Jona,Switzerland] | ** Geocoding "Oberseestrasse+10,Rapperswil-Jona,Switzerland": [http://tinygeocoder.com/create-api.php?q=Oberseestrasse+10,Rapperswil-Jona,Switzerland] | ||
** Reverse geocoding of "47.2230647,8.8165114": [http://tinygeocoder.com/create-api.php?g=47.2230647,8.8165114] | ** Reverse geocoding of "47.2230647,8.8165114": [http://tinygeocoder.com/create-api.php?g=47.2230647,8.8165114] | ||
+ | * GeoAdmin API 2.5, SwissSearch: geocoding and SwissSearch: reversegeocoding [http://api.geo.admin.ch/main/wsgi/doc/build/] | ||
+ | * Nominatim | ||
== Geocoding mit MS Excel == | == Geocoding mit MS Excel == | ||
Zeile 26: | Zeile 69: | ||
* Juice Analytics: Geocodiert einzeln/mehrere Adressen international (Basis Yahoo Webservice) sowie Google Earth ()-Output. Hinweis: Dazu muss man a) einen Yahoo-Account haben und b) eine Application-ID (Authentisierungs-Typ Generic) beziehen; beides ist kostenlos. [http://www.juiceanalytics.com/writing/2006/04/excel-geocoding-tool-v2/ zum Download...] | * Juice Analytics: Geocodiert einzeln/mehrere Adressen international (Basis Yahoo Webservice) sowie Google Earth ()-Output. Hinweis: Dazu muss man a) einen Yahoo-Account haben und b) eine Application-ID (Authentisierungs-Typ Generic) beziehen; beides ist kostenlos. [http://www.juiceanalytics.com/writing/2006/04/excel-geocoding-tool-v2/ zum Download...] | ||
* Weiterentwicklung mit Google Maps (falls mehrere Adressen codiert werden sollen, yahoo_id = "YahooDemo" ersetzen durch eigene Application-ID): [http://thinedgeofthewedge.blogspot.com/2007/08/excel-spreadsheet-for-getting-geo.html zum Download...] | * Weiterentwicklung mit Google Maps (falls mehrere Adressen codiert werden sollen, yahoo_id = "YahooDemo" ersetzen durch eigene Application-ID): [http://thinedgeofthewedge.blogspot.com/2007/08/excel-spreadsheet-for-getting-geo.html zum Download...] | ||
+ | |||
+ | == Geocoding mit QGIS == | ||
+ | |||
+ | * Plugin: http://plugins.qgis.org/plugins/GeoCoding/ - arbeitet nur mit einer Adresse auf's Mal. | ||
+ | * Mögliche Quellen: Nominatim oder bing. | ||
Siehe auch: | Siehe auch: | ||
* [[Georeferenzieren]] | * [[Georeferenzieren]] | ||
* [[Google Maps Hacks]] | * [[Google Maps Hacks]] | ||
+ | |||
+ | |||
+ | == Geocoding mit Python == | ||
+ | |||
+ | Siehe auch: [[Python]]. | ||
+ | |||
+ | "Géocoder en masse plusieurs milliers d’adresses avec Python et Nominatim" par AdrienVH, le 18/01/2015 | ||
+ | [http://blog.adrienvh.fr/2015/01/18/geocoder-en-masse-plusieurs-milliers-dadresses-avec-python-et-nominatim/]. | ||
+ | |||
+ | """ ==================================================== | ||
+ | geocode.py - a geocoder based on OSM / Nominatim | ||
+ | Dependencies: GeoPy | ||
+ | Input : File adresses.csv | ||
+ | Output : File resultat.csv | ||
+ | ==================================================== """ | ||
+ | import csv | ||
+ | from geopy.geocoders import Nominatim # needs GeoPy lib! | ||
+ | geocoder = Nominatim() | ||
+ | inputFile = open('adresses.csv', 'rb') | ||
+ | outputFile = open('resultat.csv', 'w') | ||
+ | try: | ||
+ | outputData = csv.writer(outputFile, delimiter=';', lineterminator='\n') | ||
+ | outputData.writerow(('adresse', 'latitude', 'longitude')) | ||
+ | inputData = csv.reader(inputFile, delimiter=';') | ||
+ | for ligne in dataInput: | ||
+ | adresse = ligne[0] + ", " + ligne[1] | ||
+ | try: | ||
+ | location = geocoder.geocode(adresse, True, 30) | ||
+ | outputData.writerow((adresse, location.latitude, location.longitude)) | ||
+ | except Exception as inst: | ||
+ | print inst | ||
+ | finally: | ||
+ | inputFile.close() | ||
+ | outputFile.close() | ||
== Weblinks == | == Weblinks == | ||
Zeile 36: | Zeile 118: | ||
* http://freegeographytools.com/2007/another-free-excel-geocoder | * http://freegeographytools.com/2007/another-free-excel-geocoder | ||
* http://www.batchgeocode.com/ | * http://www.batchgeocode.com/ | ||
+ | * http://www.findlatitudeandlongitude.com/batch-geocode/ |
Version vom 8. März 2019, 10:59 Uhr
The geocoding (geolocalization, DE:Geokodierung) is the process of finding associated geographic coordinates (e.g. latitude/longitude or northing/easting) from other geographic data, such as addresses (street name and street or building number), postal codes or place names. Since address data is a laborious data (like most geospatial data) and often copyrighted there is no single free solution or service.
Inhaltsverzeichnis
Geocoding Data
- Nominatim - OpenStreetMap place names: http://nominatim.osm.org/
- OSMNames: http://osmnames.org/
- Geonames.org: http://www.geonames.org/
- Who's on first: https://whosonfirst.mapzen.com/
- Quattroshapes by Foursquare (see e.g. https://allaroundgis.wordpress.com/2016/01/12/quattroshapes/ )
- Alpha Shapes by Flickr.com
Geocoding Systems
There are many geocoding systems which try to refer to location without coordinates and without streetnames or housenumbers: See https://en.wikipedia.org/wiki/Geocoding .
Open Location Codes (OLC) are a promising way of encoding location into a form that is easier to use than latitude and longitude. They are designed to be used like street addresses, especially in places where buildings aren't numbered or street names do not exist. OLC stands for the technology including the publicly available specs and open source libraries. When speaking about a specific OLC code one can also call it "Plus code" or Short Code.
- Public OLC site (Doku. Forum etc.): http://www.openlocationcode.com/
- OLC Github project (Wiki, z.B. Python): https://github.com/google/open-location-code/tree/master/python
- OLC/Plus Codes Demo site: http://plus.codes/
- Presentation from main author Doug Rinckes: http://2017.stateofthemap.org/2017/open-source-street-addresses/
Example: "bQm Kulturcafé & Bar":
- Lat/Lon: 47.375938,8.546687
- Plus Code (complete 10 codes): 8FVC9GGW+9M
- Plus Code (short code): 9GGW+9M
- Plus Code (shorter code with geoname): GW+9M Zürich
>> The section below is outdated and needs to be updated <<
Given a local spreadsheet with not-yet-geocoded address data, there are following current solutions:
- ArcGIS Online or Google Fusion Tables (data source for both: Google): no programming, webbased service, data needs to be uploaded, needs Google or AGOL account => See ArcGIS Online and Esri Help Pages.
- Google Docs with App Script (data source: Google): predefined scripts, webbased service, data needs to be uploaded => See https://github.com/mapbox/geo-googledocs .
- Mapquest (data source: Nominatim/OpenStreetMap): predefined scripts, webbased service, data remains locally => See http://schoolofdata.org/handbook/recipes/geocoding/ .
- SpatiaLite (data source: MOPublic/Swiss Cadastre and Statistics): local sw, local data, predefined scripts. See SpatiaLite.
Geocoding im Web
- Eine Adresse aufs Mal
- Nominatim by OpenStreetMap (volunteering maintainers).
- Pelias by MapZen (and OpenStreetMap data)
- Eagle (Geocode.com / Tele Atlas)
- Geocoding Service - TravelGIS.com (eine Adresse aufs Mal)
- Service des Netzwelt-Magazin (eine Adresse aufs Mal)
- Weitere:
- http://www.geonames.org/export/web-services.html#postalCodeSearch (kostenlos).
- Geocoding-Liste, insbesondere Geocodierung von Internet-Adressen.
- (OpenAddresses)
Geocoding APIs
- Online batch geocoder for journalists geocode.localfocus.nl.
- OpenCage Geocoder [1]
- MapQuest Open Geocoding API Service ([2]) (und weitere [3]) (Beschränkungen: Gibt nur Ortschaft/Strasse zurück?; Lizenz: CC-BY-SA)
- Yahoo BOSS Geo Services (kostenpflichtig!)
'Yahoo! PlaceFinder API' Service (Beschränkungen: mit API-Key; max. 50'000 Requests/Tag; Lizenz: ???) - 'Bing Maps APIs' (Beschränkungen: mit API-Key? unübersichtlich; Lizenz: ???).
- Geoadmin API (Beschränkungen: verschiedene; ?; Lizenz: Bund...???)
- Geonames findNearestIntersectionOSM oder postalCodeSearch (Beschränkungen: availability; Lizenz: "free"/CC-BY-SA)
- 'Google Maps Geocoding API' Service (Beschränkungen: nur 2'500 Requests/Tag und Resultat muss im Web sichtbar gemacht werden)
- tinygeocoder.com:
- GeoAdmin API 2.5, SwissSearch: geocoding and SwissSearch: reversegeocoding [6]
- Nominatim
Geocoding mit MS Excel
Geocoding von Adressen aus Excel mit VB programmiert
- Juice Analytics: Geocodiert einzeln/mehrere Adressen international (Basis Yahoo Webservice) sowie Google Earth ()-Output. Hinweis: Dazu muss man a) einen Yahoo-Account haben und b) eine Application-ID (Authentisierungs-Typ Generic) beziehen; beides ist kostenlos. zum Download...
- Weiterentwicklung mit Google Maps (falls mehrere Adressen codiert werden sollen, yahoo_id = "YahooDemo" ersetzen durch eigene Application-ID): zum Download...
Geocoding mit QGIS
- Plugin: http://plugins.qgis.org/plugins/GeoCoding/ - arbeitet nur mit einer Adresse auf's Mal.
- Mögliche Quellen: Nominatim oder bing.
Siehe auch:
Geocoding mit Python
Siehe auch: Python.
"Géocoder en masse plusieurs milliers d’adresses avec Python et Nominatim" par AdrienVH, le 18/01/2015 [7].
""" ==================================================== geocode.py - a geocoder based on OSM / Nominatim Dependencies: GeoPy Input : File adresses.csv Output : File resultat.csv ==================================================== """ import csv from geopy.geocoders import Nominatim # needs GeoPy lib! geocoder = Nominatim() inputFile = open('adresses.csv', 'rb') outputFile = open('resultat.csv', 'w') try: outputData = csv.writer(outputFile, delimiter=';', lineterminator='\n') outputData.writerow(('adresse', 'latitude', 'longitude')) inputData = csv.reader(inputFile, delimiter=';') for ligne in dataInput: adresse = ligne[0] + ", " + ligne[1] try: location = geocoder.geocode(adresse, True, 30) outputData.writerow((adresse, location.latitude, location.longitude)) except Exception as inst: print inst finally: inputFile.close() outputFile.close()
Weblinks
Generell/Liste: http://del.icio.us/search/?all=geocoding