From dd2af74b0326d214170c6101ed4b8192f54914a5 Mon Sep 17 00:00:00 2001 From: Mario de Frutos Date: Mon, 28 Mar 2016 16:44:58 +0200 Subject: [PATCH] Add mapzen geocoder as provider in the geocoding docs --- doc/geocoding_functions.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 6defcaa..6bed114 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -267,6 +267,7 @@ SELECT cdb_geocode_ipaddress_point('102.23.34.1') ```bash UPDATE {tablename} SET the_geom = cdb_geocode_ipaddress_point('102.23.34.1') ``` + ## Street-level geocoder This function provides a street-level geocoding service. This service uses the street level geocoder defined for the user. @@ -277,12 +278,12 @@ This function provides a street-level geocoding service. This service uses the s #### Arguments -Name | Type | Description ---- | --- | --- -`searchtext` | `text` | searchtext contains free-form text containing address elements. You can specify the searchtext parameter by itself, or you can specify it with other parameters to narrow your search. For example, you can specify the state or country parameters, along with a free-form address in the searchtext field. -`city` | `text` | (Optional) Name of the city -`state` | `text` | (Optional) Name of the state -`country` | `text` | (Optional) Name of the country +Name | Type | Description | Provider +--- | --- | --- | --- +`searchtext` | `text` | searchtext contains free-form text containing address elements. You can specify the searchtext parameter by itself, or you can specify it with other parameters to narrow your search. For example, you can specify the state or country parameters, along with a free-form address in the searchtext field. | Here, Google, Mapzen +`city` | `text` | (Optional) Name of the city. | Here and Google +`state` | `text` | (Optional) Name of the state | Here and Google +`country` | `text` | (Optional) Name of the country. *If you're using **Mapzen** as provider you must use alpha-2 or alpha-3 [ISO-3166](https://en.wikipedia.org/wiki/ISO_3166-1) country codes* | Here, Google and Mapzen #### Returns @@ -292,6 +293,8 @@ Geometry (point, EPSG 4326) or null ##### Select +Using **Here** or **Google** as providers + ```bash SELECT cdb_geocode_street_point('651 Lombard Street, San Francisco, California, United States') SELECT cdb_geocode_street_point('651 Lombard Street', 'San Francisco') @@ -299,6 +302,12 @@ SELECT cdb_geocode_street_point('651 Lombard Street', 'San Francisco', 'Californ SELECT cdb_geocode_street_point('651 Lombard Street', 'San Francisco', 'California', 'United States') ``` +Using **Mapzen** as provider + +```bash +SELECT cdb_geocode_street_point('651 Lombard Street San Francisco California', NULL, NULL, 'USA') +``` + ##### Update ```bash