From a1d6f79999ea3c4b34a3882a70876c6ff2baa79f Mon Sep 17 00:00:00 2001 From: Mario de Frutos Date: Wed, 27 Jan 2016 17:53:17 +0100 Subject: [PATCH 1/5] Add the geocode street function doc --- doc/reference.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/doc/reference.md b/doc/reference.md index 59552be..01a6090 100644 --- a/doc/reference.md +++ b/doc/reference.md @@ -267,3 +267,44 @@ SELECT cdb_geocode_ipaddress_point('102.23.34.1') ```sql UPDATE {tablename} SET the_geom = cdb_geocode_ipaddress_point('102.23.34.1') ``` +## Street geocoder + +This function provides a street geocoding service. This service uses the street level geocoder defined for the user (right now only Heremaps geocoder is available). + +**This service is subject to quota limitations, and extra fees may apply. Please check our [terms and conditions](https://cartodb.com/terms/)** + +You should take into account the following advises about the use of this function: + - One credit per query will be charged, so you are therefore discouraged from using dynamic queries to the Geocoder API in your maps + - Dynamic queries in the maps may be forbidden in the futures. + - Store results of Geocoder API queries into your datasets and refresh them as needed, so that you can have finer control on your credits' usage. + +### cdb_geocode_street_point(_search_text text, [city text], [state text], [country text]_) + +#### 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 + +#### Returns + +Geometry (point, EPSG 4326) or null + +#### Example + +##### Select + +```sql +SELECT cdb_geocode_geocode_street_point('Lombard Street, San Francisco, California, United States') +SELECT cdb_geocode_geocode_street_point('Lombard Street' 'San Francisco') +SELECT cdb_geocode_geocode_street_point('Lombard Street' 'San Francisco', 'California') +SELECT cdb_geocode_geocode_street_point('Lombard Street' 'San Francisco', 'California', 'United States') +``` + +##### Update + +```sql +UPDATE {tablename} SET {the_geom} = cdb_geocode_street_point({street_name_column}) From a7e83dab493b8f8dec8b6fdb5133d13ca462071a Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Thu, 28 Jan 2016 18:16:10 +0100 Subject: [PATCH 2/5] Add some corrections to the documentation --- doc/reference.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/reference.md b/doc/reference.md index 01a6090..19e5ed7 100644 --- a/doc/reference.md +++ b/doc/reference.md @@ -267,16 +267,16 @@ SELECT cdb_geocode_ipaddress_point('102.23.34.1') ```sql UPDATE {tablename} SET the_geom = cdb_geocode_ipaddress_point('102.23.34.1') ``` -## Street geocoder +## Street-level geocoder -This function provides a street geocoding service. This service uses the street level geocoder defined for the user (right now only Heremaps geocoder is available). +This function provides a street-level geocoding service. This service uses the street level geocoder defined for the user (right now only Here geocoder is available). **This service is subject to quota limitations, and extra fees may apply. Please check our [terms and conditions](https://cartodb.com/terms/)** -You should take into account the following advises about the use of this function: - - One credit per query will be charged, so you are therefore discouraged from using dynamic queries to the Geocoder API in your maps - - Dynamic queries in the maps may be forbidden in the futures. - - Store results of Geocoder API queries into your datasets and refresh them as needed, so that you can have finer control on your credits' usage. +You should take into account the following remarks about the usage of this function: + - **One credit per function call will be consumed** and the results are not cached. If the query applies to a N rows dataset, then N credits will be used. + - You are therefore discouraged from using dynamic queries to the Geocoder API in your maps. This can result in credits consumption per map view. Furthermore, **queries to the Geocoder API in the maps may be forbidden in the future**. + - You are advised to store results of Geocoder API queries into your datasets and refresh them as needed, so that you can have finer control on your credits' usage. ### cdb_geocode_street_point(_search_text text, [city text], [state text], [country text]_) @@ -308,3 +308,4 @@ SELECT cdb_geocode_geocode_street_point('Lombard Street' 'San Francisco', 'Calif ```sql UPDATE {tablename} SET {the_geom} = cdb_geocode_street_point({street_name_column}) +``` From a147e7686058bcc32f82c0511ada534eb15a581b Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Thu, 28 Jan 2016 18:18:07 +0100 Subject: [PATCH 3/5] Small style fix (too much bold text) --- doc/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/reference.md b/doc/reference.md index 19e5ed7..a38b3bf 100644 --- a/doc/reference.md +++ b/doc/reference.md @@ -271,7 +271,7 @@ UPDATE {tablename} SET the_geom = cdb_geocode_ipaddress_point('102.23.34.1') This function provides a street-level geocoding service. This service uses the street level geocoder defined for the user (right now only Here geocoder is available). -**This service is subject to quota limitations, and extra fees may apply. Please check our [terms and conditions](https://cartodb.com/terms/)** +**This service is subject to quota limitations, and extra fees may apply.** Please check our [terms and conditions](https://cartodb.com/terms/) You should take into account the following remarks about the usage of this function: - **One credit per function call will be consumed** and the results are not cached. If the query applies to a N rows dataset, then N credits will be used. From 179c3fea35b6db05d4d57547ac07033a5f7c4af6 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Thu, 28 Jan 2016 18:25:38 +0100 Subject: [PATCH 4/5] Add street number to example queries --- doc/reference.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/reference.md b/doc/reference.md index a38b3bf..1ee00e8 100644 --- a/doc/reference.md +++ b/doc/reference.md @@ -298,10 +298,10 @@ Geometry (point, EPSG 4326) or null ##### Select ```sql -SELECT cdb_geocode_geocode_street_point('Lombard Street, San Francisco, California, United States') -SELECT cdb_geocode_geocode_street_point('Lombard Street' 'San Francisco') -SELECT cdb_geocode_geocode_street_point('Lombard Street' 'San Francisco', 'California') -SELECT cdb_geocode_geocode_street_point('Lombard Street' 'San Francisco', 'California', 'United States') +SELECT cdb_geocode_geocode_street_point('651 Lombard Street, San Francisco, California, United States') +SELECT cdb_geocode_geocode_street_point('651 Lombard Street' 'San Francisco') +SELECT cdb_geocode_geocode_street_point('651 Lombard Street' 'San Francisco', 'California') +SELECT cdb_geocode_geocode_street_point('651 Lombard Street' 'San Francisco', 'California', 'United States') ``` ##### Update From 23310dc0243f1f51294ffea3361350de31c267cc Mon Sep 17 00:00:00 2001 From: csobier Date: Thu, 28 Jan 2016 12:33:17 -0500 Subject: [PATCH 5/5] Just applied some minor grammar edits --- doc/reference.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/reference.md b/doc/reference.md index 1ee00e8..6c6607d 100644 --- a/doc/reference.md +++ b/doc/reference.md @@ -269,13 +269,13 @@ 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 (right now only Here geocoder is available). +This function provides a street-level geocoding service. This service uses the street level geocoder defined for the user (currently, only the Here geocoder is available). -**This service is subject to quota limitations, and extra fees may apply.** Please check our [terms and conditions](https://cartodb.com/terms/) +**This service is subject to quota limitations, and extra fees may apply.** Please view our [terms and conditions](https://cartodb.com/terms/) -You should take into account the following remarks about the usage of this function: - - **One credit per function call will be consumed** and the results are not cached. If the query applies to a N rows dataset, then N credits will be used. - - You are therefore discouraged from using dynamic queries to the Geocoder API in your maps. This can result in credits consumption per map view. Furthermore, **queries to the Geocoder API in the maps may be forbidden in the future**. +Be mindful of the following when using this function: + - **One credit per function call will be consumed**, and the results are not cached. If the query applies to a N rows dataset, then N credits will be used. + - You are discouraged from using dynamic queries to the Geocoder API in your maps. This can result in credits consumption per map view. Note: **queries to the Geocoder API in your maps may be forbidden in the future**. - You are advised to store results of Geocoder API queries into your datasets and refresh them as needed, so that you can have finer control on your credits' usage. ### cdb_geocode_street_point(_search_text text, [city text], [state text], [country text]_) @@ -284,7 +284,7 @@ You should take into account the following remarks about the usage of this funct 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. +`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