From dd2af74b0326d214170c6101ed4b8192f54914a5 Mon Sep 17 00:00:00 2001 From: Mario de Frutos Date: Mon, 28 Mar 2016 16:44:58 +0200 Subject: [PATCH 01/22] 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 From 28b4b12ce4d2d669fffae0ec731be5f65c303377 Mon Sep 17 00:00:00 2001 From: csobier Date: Mon, 28 Mar 2016 11:00:21 -0400 Subject: [PATCH 02/22] minor edits to mapzen geocoder provider inserts --- doc/geocoding_functions.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 6bed114..37aae39 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -280,10 +280,10 @@ This function provides a street-level geocoding service. This service uses the s 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 +`searchtext` | `text` | searchtext contains free-form text containing address elements. You can specify the searchtext parameter by itself, or 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 +`state` | `text` | (Optional) Name of the state. | Here and Google +`country` | `text` | (Optional) Name of the country. *If you are using **Mapzen** as the geocoder 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 @@ -293,7 +293,7 @@ Geometry (point, EPSG 4326) or null ##### Select -Using **Here** or **Google** as providers +Using **Here** or **Google** as the geocoder provider ```bash SELECT cdb_geocode_street_point('651 Lombard Street, San Francisco, California, United States') @@ -302,7 +302,7 @@ 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 +Using **Mapzen** as the geocoder provider ```bash SELECT cdb_geocode_street_point('651 Lombard Street San Francisco California', NULL, NULL, 'USA') From 8eeef94eab9a182815bf02404e89295f44c9f470 Mon Sep 17 00:00:00 2001 From: csobier Date: Tue, 5 Apr 2016 16:21:34 -0400 Subject: [PATCH 03/22] added quick start info about mapzen --- doc/geocoding_functions.md | 4 +++- doc/quickstart.md | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 37aae39..4011076 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -1,4 +1,4 @@ -# Geocoding functions +# Geocoding Functions The following geocoding functions are available, grouped by categories. @@ -313,3 +313,5 @@ SELECT cdb_geocode_street_point('651 Lombard Street San Francisco California', N ```bash UPDATE {tablename} SET the_geom = cdb_geocode_street_point({street_name_column}) ``` + +**Tip:** See [Using Mapzen for Geocoding and Routing](http://cartodb-platform/dataservices-api/quickstart/#using-mapzen-for-geocoding-and-routing) if you are using the Mapzen API for geocoding. \ No newline at end of file diff --git a/doc/quickstart.md b/doc/quickstart.md index a567904..5940b1f 100644 --- a/doc/quickstart.md +++ b/doc/quickstart.md @@ -24,3 +24,7 @@ Notice that you can make use of Postgres or PostGIS functions in your Data Servi ```bash https://{username}.cartodb.com/api/v2/sql?q=SELECT ST_Centroid(cdb_geocode_admin0_polygon('USA'))&api_key={Your API key} ``` + +## Using Mapzen for Geocoding and Routing + +You can use Mapzen as the [geocoder service provider](http://cartodb-platform/dataservices-api/geocoding-functions/#geocoding-functions) with CartoDB. You can also use the [Mapzen API](https://mapzen.com/documentation/search/) directly, to geocode your data. Additionally, the Mapzen routing service is built into the [routing functions](http://cartodb-platform/dataservices-api/routing-functions/#routing-functions) of CartoDB. \ No newline at end of file From dab46269d45db9118c6ca0a7f8c05f06f2ed2c4f Mon Sep 17 00:00:00 2001 From: csobier Date: Wed, 6 Apr 2016 07:42:38 -0400 Subject: [PATCH 04/22] url fixes --- doc/quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/quickstart.md b/doc/quickstart.md index 5940b1f..71ea95c 100644 --- a/doc/quickstart.md +++ b/doc/quickstart.md @@ -27,4 +27,4 @@ https://{username}.cartodb.com/api/v2/sql?q=SELECT ST_Centroid(cdb_geocode_admin ## Using Mapzen for Geocoding and Routing -You can use Mapzen as the [geocoder service provider](http://cartodb-platform/dataservices-api/geocoding-functions/#geocoding-functions) with CartoDB. You can also use the [Mapzen API](https://mapzen.com/documentation/search/) directly, to geocode your data. Additionally, the Mapzen routing service is built into the [routing functions](http://cartodb-platform/dataservices-api/routing-functions/#routing-functions) of CartoDB. \ No newline at end of file +You can use Mapzen as the [geocoder service provider](http://docs.cartodb.com/cartodb-platform/dataservices-api/#geocoding-functions) with CartoDB. You can also use the [Mapzen API](https://mapzen.com/documentation/search/) directly, to geocode your data. Additionally, the Mapzen routing service is built into the [routing functions](http://docs.cartodb.com/cartodb-platform/dataservices-api/quickstart/#routing-functions) of CartoDB. From 652bd6abd65b7eceeb3113d1a63430d66ea9b2cb Mon Sep 17 00:00:00 2001 From: csobier Date: Wed, 6 Apr 2016 07:56:15 -0400 Subject: [PATCH 05/22] fixed url --- doc/geocoding_functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 4011076..0442893 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -314,4 +314,4 @@ SELECT cdb_geocode_street_point('651 Lombard Street San Francisco California', N UPDATE {tablename} SET the_geom = cdb_geocode_street_point({street_name_column}) ``` -**Tip:** See [Using Mapzen for Geocoding and Routing](http://cartodb-platform/dataservices-api/quickstart/#using-mapzen-for-geocoding-and-routing) if you are using the Mapzen API for geocoding. \ No newline at end of file +**Tip:** See [Using Mapzen for Geocoding and Routing](http://docs.cartodb.com/cartodb-platform/dataservices-api/quickstart/#using-mapzen-for-geocoding-and-routing) if you are using the Mapzen API for geocoding. From 75d58dc8363453b853c9295d6f7918d63aa64f49 Mon Sep 17 00:00:00 2001 From: csobier Date: Wed, 6 Apr 2016 07:57:51 -0400 Subject: [PATCH 06/22] fix url --- doc/quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/quickstart.md b/doc/quickstart.md index 71ea95c..8300385 100644 --- a/doc/quickstart.md +++ b/doc/quickstart.md @@ -27,4 +27,4 @@ https://{username}.cartodb.com/api/v2/sql?q=SELECT ST_Centroid(cdb_geocode_admin ## Using Mapzen for Geocoding and Routing -You can use Mapzen as the [geocoder service provider](http://docs.cartodb.com/cartodb-platform/dataservices-api/#geocoding-functions) with CartoDB. You can also use the [Mapzen API](https://mapzen.com/documentation/search/) directly, to geocode your data. Additionally, the Mapzen routing service is built into the [routing functions](http://docs.cartodb.com/cartodb-platform/dataservices-api/quickstart/#routing-functions) of CartoDB. +You can use Mapzen as the [geocoder service provider](http://docs.cartodb.com/cartodb-platform/dataservices-api/#geocoding-functions) with CartoDB. You can also use the [Mapzen API](https://mapzen.com/documentation/search/) directly, to geocode your data. Additionally, the Mapzen routing service is built into the [routing functions](http://docs.cartodb.com/cartodb-platform/dataservices-api/#routing-functions) of CartoDB. From 9e90ee3e1fb990e8f9a381d2bb4b56fda6ff81bd Mon Sep 17 00:00:00 2001 From: csobier Date: Mon, 11 Apr 2016 09:01:49 -0400 Subject: [PATCH 07/22] clarified how to access Mapzen features --- doc/geocoding_functions.md | 4 ++-- doc/quickstart.md | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 0442893..28ef5a4 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -308,10 +308,10 @@ Using **Mapzen** as the geocoder provider SELECT cdb_geocode_street_point('651 Lombard Street San Francisco California', NULL, NULL, 'USA') ``` +**Tip:** If you are using the Mapzen API for geocoding, see the integration details in the [Quickstart](http://docs.cartodb.com/cartodb-platform/dataservices-api/quickstart/#using-mapzen-for-geocoding-and-routing) section. + ##### Update ```bash UPDATE {tablename} SET the_geom = cdb_geocode_street_point({street_name_column}) ``` - -**Tip:** See [Using Mapzen for Geocoding and Routing](http://docs.cartodb.com/cartodb-platform/dataservices-api/quickstart/#using-mapzen-for-geocoding-and-routing) if you are using the Mapzen API for geocoding. diff --git a/doc/quickstart.md b/doc/quickstart.md index 8300385..b01f4b4 100644 --- a/doc/quickstart.md +++ b/doc/quickstart.md @@ -11,9 +11,9 @@ https://{username}.cartodb.com/api/v2/sql?q=SELECT cdb_geocode_admin0_polygon('U In order to geocode an existent CartoDB dataset, an SQL UPDATE statement must be used to populate the geometry column in the dataset with the results of the Geocoding API. For example, if the column where you are storing the country names for each one of our rows is called `country_column`, run the following statement in order to geocode the dataset: ```bash -https://{username}.cartodb.com/api/v2/sql?q=UPDATE {tablename} SET the_geom = cdb_geocode_admin0_polygon({country_column})&api_key={Your API key} +https://{username}.cartodb.com/api/v2/sql?q=UPDATE {tablename} SET the_geom = cdb_geocode_admin0_You can use the isoline functions to retrieve, for example, isochrone lines from a certain location, specifying the mode and the ranges that will define each of the isolines. The following query calculates isolines for areas that are 5, 10 and 15 minutes (300, 600 and 900 seconds, respectively) away from the location by following a path defined by car routing. +polygon({country_column})&api_key={Your API key} ``` -You can use the isoline functions to retrieve, for example, isochrone lines from a certain location, specifying the mode and the ranges that will define each of the isolines. The following query calculates isolines for areas that are 5, 10 and 15 minutes (300, 600 and 900 seconds, respectively) away from the location by following a path defined by car routing. ```bash https://{username}.cartodb.com/api/v2/sql?q=SELECT cdb_isochrone('POINT(-3.70568 40.42028)'::geometry, 'car', ARRAY[300,600,900]::integer[])&api_key={Your API key} @@ -27,4 +27,10 @@ https://{username}.cartodb.com/api/v2/sql?q=SELECT ST_Centroid(cdb_geocode_admin ## Using Mapzen for Geocoding and Routing -You can use Mapzen as the [geocoder service provider](http://docs.cartodb.com/cartodb-platform/dataservices-api/#geocoding-functions) with CartoDB. You can also use the [Mapzen API](https://mapzen.com/documentation/search/) directly, to geocode your data. Additionally, the Mapzen routing service is built into the [routing functions](http://docs.cartodb.com/cartodb-platform/dataservices-api/#routing-functions) of CartoDB. +You can use Mapzen as the service provider for [geocoding](http://docs.cartodb.com/cartodb-platform/dataservices-api/#geocoding-functions) and [routing](http://docs.cartodb.com/cartodb-platform/dataservices-api/#routing-functions) with CartoDB. This enables you to take advantage of the [geocoding search](https://mapzen.com/documentation/search/) features, and the [turn-by-turn routing](https://mapzen.com/documentation/turn-by-turn/) service that Mapzen offers. To use these features through CartoDB, all you need is a Mapzen API Key. + +Integration with Mapzen varies, depending on your account plan: + +- Enterprise account users will receive a Mapzen API Key through CartoDB +- All other account plans can go to the [Mapzen Developers page](https://mapzen.com/developers/sign_in) to retrieve an API key. This is a free integration that allows you to access the Mapzen services by connecting your GitHub account + From 6105f677af5be3c8bfc578f7447d7f5e24907499 Mon Sep 17 00:00:00 2001 From: csobier Date: Mon, 11 Apr 2016 10:20:43 -0400 Subject: [PATCH 08/22] added mapzen basemap details --- doc/geocoding_functions.md | 2 +- doc/quickstart.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 28ef5a4..685ecd4 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -308,7 +308,7 @@ Using **Mapzen** as the geocoder provider SELECT cdb_geocode_street_point('651 Lombard Street San Francisco California', NULL, NULL, 'USA') ``` -**Tip:** If you are using the Mapzen API for geocoding, see the integration details in the [Quickstart](http://docs.cartodb.com/cartodb-platform/dataservices-api/quickstart/#using-mapzen-for-geocoding-and-routing) section. +**Tip:** If you are using the Mapzen API for geocoding, see the integration details in the [Quickstart](http://docs.cartodb.com/cartodb-platform/dataservices-api/quickstart/#using-mapzen-services) section. ##### Update diff --git a/doc/quickstart.md b/doc/quickstart.md index b01f4b4..a983a4e 100644 --- a/doc/quickstart.md +++ b/doc/quickstart.md @@ -25,7 +25,7 @@ Notice that you can make use of Postgres or PostGIS functions in your Data Servi https://{username}.cartodb.com/api/v2/sql?q=SELECT ST_Centroid(cdb_geocode_admin0_polygon('USA'))&api_key={Your API key} ``` -## Using Mapzen for Geocoding and Routing +## Using Mapzen Services You can use Mapzen as the service provider for [geocoding](http://docs.cartodb.com/cartodb-platform/dataservices-api/#geocoding-functions) and [routing](http://docs.cartodb.com/cartodb-platform/dataservices-api/#routing-functions) with CartoDB. This enables you to take advantage of the [geocoding search](https://mapzen.com/documentation/search/) features, and the [turn-by-turn routing](https://mapzen.com/documentation/turn-by-turn/) service that Mapzen offers. To use these features through CartoDB, all you need is a Mapzen API Key. @@ -34,3 +34,4 @@ Integration with Mapzen varies, depending on your account plan: - Enterprise account users will receive a Mapzen API Key through CartoDB - All other account plans can go to the [Mapzen Developers page](https://mapzen.com/developers/sign_in) to retrieve an API key. This is a free integration that allows you to access the Mapzen services by connecting your GitHub account +**Tip** You can also use [Mapzen basemaps](https://mapzen.com/documentation/vector-tiles/) by integrating with their API. This is useful is you want to include a vector tile service basemap with your CartoDB map. To include their external basemaps, define the URL and Mapzen attributions in the [HTTP data layer of your MapConfig](http://docs.cartodb.com/cartodb-platform/maps-api/mapconfig/#http-layer-options) file. Currently, Mapzen vector tile basemaps are only supported via the API, and are not available through the CartoDB Editor. From 30cb5869f1ddd31b9d1d20bb12cc95ca690cd72e Mon Sep 17 00:00:00 2001 From: csobier Date: Tue, 12 Apr 2016 17:19:51 -0400 Subject: [PATCH 09/22] reorg of docs format and editing, removed mentions of providers --- doc/API.md | 13 +++++------- doc/general_concepts.md | 33 ------------------------------ doc/geocoding_functions.md | 41 ++++++++++++++++++++++++-------------- doc/isoline_functions.md | 27 ++++++++++++++++++++----- doc/overview.md | 41 ++++++++++++++++++++++++++++++++++++++ doc/quickstart.md | 37 ---------------------------------- doc/quota_information.md | 20 +++++++------------ 7 files changed, 101 insertions(+), 111 deletions(-) delete mode 100644 doc/general_concepts.md create mode 100644 doc/overview.md delete mode 100644 doc/quickstart.md diff --git a/doc/API.md b/doc/API.md index da60037..0442075 100644 --- a/doc/API.md +++ b/doc/API.md @@ -2,13 +2,10 @@ The CartoDB Data Services API offers a set of location based services that can be used programatically to empower your geospatial applications. -The geocoder functions allow you to match your data with geometries on your map. This geocoding service can be used programatically to geocode datasets via the CartoDB SQL API. It is fed from _Open Data_ and it serves geometries for countries, provinces, states, cities, postal codes, IP addresses and street addresses. - -The isoline functions provide a way to generate isolines in terms of distance and time, by means of the available isodistance and isochrone functions useful for Trade Areas Analysis. - ## Documentation -* [Quickstart](quickstart.md) -* [General concepts](general_concepts.md) -* [Geocoding functions](geocoding_functions.md) -* [Isoline functions](isoline_functions.md) +* [Overview](overview.md) +* [Geocoding Functions](geocoding_functions.md) +* [Isoline Functions](isoline_functions.md) +* [Routing Functions](routing_functions.md) +* [Quota Information](quota_information.md) diff --git a/doc/general_concepts.md b/doc/general_concepts.md deleted file mode 100644 index 10f0a13..0000000 --- a/doc/general_concepts.md +++ /dev/null @@ -1,33 +0,0 @@ -# General concepts - -The Data Services API offers geocoding and isoline services on top of the CartoDB SQL API by means of a set of functions. Each one of these functions is oriented to one kind of operation and returns the corresponding geometry (a `polygon` or a `point`), according to the input information. - -The Data Services API decouples the geocoding and isoline services from the CartoDB Editor. The API allows you to geocode data (from single rows, complete datasets, or simple inputs) and to perform trade areas analysis (computing isodistances or isochrones) programatically through authenticated requests. - -The geometries provided by this API are projected in the projection [WGS 84 SRID 4326](http://spatialreference.org/ref/epsg/wgs-84/). - -The Geocoder functions can return different types of geometries (points or polygons) as result of different geocoding processes. The CartoDB platform does not support multigeometry layers or datasets, therefore the final users of this Data Services API must check that they are using consistent geometry types inside a table to avoid further conflicts in the map visualization. - -## Authentication - -All requests performed to the CartoDB Data Services API must be authenticated with the user API Key. For more information about where to find your API Key, and how to authenticate your SQL API requests, view the [SQL API authentication](/cartodb-platform/sql-api/authentication/) guide. - -## Errors - -Errors are described in the response of the request. An example is as follows: - -```json -{ - error: [ - "The api_key must be provided" - ] -} -``` - -Since the Data Services API is used on top of the CartoDB SQL API, you can refer to the [Making calls to the SQL API](/cartodb-platform/sql-api/making-calls/) documentation for help debugging your SQL errors. - -If the requested information is not in the CartoDB geocoding database, or if CartoDB is unable to recognize your input and match it with a result, the geocoding function returns `null` as a result. - -## Limits - -Usage of the Data Services API is subject to the CartoDB SQL API limits, stated in our [Terms of Service](https://cartodb.com/terms/#excessive). diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 685ecd4..d15b7a4 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -1,7 +1,25 @@ # Geocoding Functions -The following geocoding functions are available, grouped by categories. +The geocoder functions allow you to match your data with geometries on your map. This geocoding service can be used programatically to geocode datasets via the CartoDB SQL API. It is fed from _Open Data_ and it serves geometries for countries, provinces, states, cities, postal codes, IP addresses and street addresses. Geocoding functions through CartoDB are available by requesting a single function in the Data Services API. +**This service is subject to quota limitations, and extra fees may apply**. View the [Quota Information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) section for details, and recommendations, about to quota consumption. + + +## Quickstart + +Here is an example of how to geocode a single country: + +```bash +https://{username}.cartodb.com/api/v2/sql?q=SELECT cdb_geocode_admin0_polygon('USA')&api_key={api_key} +``` + +In order to geocode an existent CartoDB dataset, an SQL UPDATE statement must be used to populate the geometry column in the dataset with the results of the Geocoding API. For example, if the column where you are storing the country names for each one of our rows is called `country_column`, run the following statement in order to geocode the dataset: + +```bash +https://{username}.cartodb.com/api/v2/sql?q=UPDATE {tablename} SET the_geom = cdb_geocode_admin0_ +``` + +The following geocoding functions are available, grouped by categories. ## Country geocoder @@ -278,12 +296,12 @@ This function provides a street-level geocoding service. This service uses the s #### Arguments -Name | Type | Description | Provider +Name | Type | Description --- | --- | --- | --- -`searchtext` | `text` | searchtext contains free-form text containing address elements. You can specify the searchtext parameter by itself, or 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 are using **Mapzen** as the geocoder 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 +`searchtext` | `text` | searchtext contains free-form text containing address elements. You can specify the searchtext parameter by itself, or 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 @@ -293,25 +311,18 @@ Geometry (point, EPSG 4326) or null ##### Select -Using **Here** or **Google** as the geocoder provider +Using SELECT for geocoding functions ```bash SELECT cdb_geocode_street_point('651 Lombard Street, San Francisco, California, United States') SELECT cdb_geocode_street_point('651 Lombard Street', 'San Francisco') SELECT cdb_geocode_street_point('651 Lombard Street', 'San Francisco', 'California') SELECT cdb_geocode_street_point('651 Lombard Street', 'San Francisco', 'California', 'United States') -``` - -Using **Mapzen** as the geocoder provider - -```bash SELECT cdb_geocode_street_point('651 Lombard Street San Francisco California', NULL, NULL, 'USA') ``` -**Tip:** If you are using the Mapzen API for geocoding, see the integration details in the [Quickstart](http://docs.cartodb.com/cartodb-platform/dataservices-api/quickstart/#using-mapzen-services) section. - ##### Update ```bash UPDATE {tablename} SET the_geom = cdb_geocode_street_point({street_name_column}) -``` +``` \ No newline at end of file diff --git a/doc/isoline_functions.md b/doc/isoline_functions.md index 630f205..eec74f6 100644 --- a/doc/isoline_functions.md +++ b/doc/isoline_functions.md @@ -1,10 +1,27 @@ -# Isoline functions +# Isoline Functions -The following functions provide an isolines generator service based on time or distance. This service uses the isolines service defined for the user (currently, only the Here isolines service is available). +[Isolines](https://cartodb.com/data/isolines/) are contoured lines that display calculated levels over a given surface area. This enables you to view polygon dimensions by forward or reverse measurements. Isoline functions are calculated as the intersection of areas from the origin point, measured by distance (isodistance) or time (isochrone). For example, the distance of a road from a sidewalk. Isoline functions through CartoDB are available by requesting a single function in the Data Services API. -**This service is subject to quota limitations, and extra fees may apply**. Please view our [terms and conditions](https://cartodb.com/terms/) and check out the [Quota information section](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) for details and recommendations related with quota usage. +**This service is subject to quota limitations, and extra fees may apply**. View the [Quota Information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) section for details, and recommendations, about to quota consumption. -### cdb_isodistance(_source geometry, mode text, range integer[], [options text[]]_) +## Quickstart + +You can use the isoline functions to retrieve, for example, isochrone lines from a certain location, specifying the mode and the ranges that will define each of the isolines. The following query calculates isolines for areas that are 5, 10 and 15 minutes (300, 600 and 900 seconds, respectively) away from the location by following a path defined by car routing. +polygon({country_column})&api_key={api_key} + +```bash +https://{username}.cartodb.com/api/v2/sql?q=SELECT cdb_isochrone('POINT(-3.70568 40.42028)'::geometry, 'car', ARRAY[300,600,900]::integer[])&api_key={api_key} +``` + +Notice that you can make use of Postgres or PostGIS functions in your Data Services API requests, as the result is a geometry that can be handled by the system. For example, suppose you need to retrieve the centroid of a specific country, you can wrap the resulting geometry from the geocoder functions inside the PostGIS `ST_Centroid` function: + +```bash +https://{username}.cartodb.com/api/v2/sql?q=SELECT ST_Centroid(cdb_geocode_admin0_polygon('USA'))&api_key={api_key} +``` + +The following functions provide an isoline generator service, based on time or distance. This service uses the isolines service defined for your account. The default service limits the usage of displayed polygons represented on top of [HERE](https://developer.here.com/coverage-info) maps. + +## cdb_isodistance(_source geometry, mode text, range integer[], [options text[]]_) #### Arguments @@ -48,7 +65,7 @@ SELECT the_geom FROM cdb_isodistance('POINT(-3.70568 40.42028)'::geometry, 'walk INSERT INTO {table} (the_geom) SELECT (cdb_isodistance(the_geom, 'walk', string_to_array(distance, ',')::integer[])).the_geom FROM {points_table} ``` -### cdb_isochrone(_source geometry, mode text, range integer[], [options text[]]_) +## cdb_isochrone(_source geometry, mode text, range integer[], [options text[]]_) #### Arguments diff --git a/doc/overview.md b/doc/overview.md new file mode 100644 index 0000000..83378cc --- /dev/null +++ b/doc/overview.md @@ -0,0 +1,41 @@ +# Overview + +By using CartoDB libraries and the SQL API, you can apply location data services to your maps with select functions. These functions are integrated with a number of internal and external services, enabling you to programatically customize subsets of data for your visualizations. For example, you can transform an address to a geometry with [geocoding functions](http://docs.cartodb.com/cartodb-platform/dataservices-api/geocoding-functions/#geocoding-functions). You can also use [isoline functions](http://docs.cartodb.com/cartodb-platform/dataservices-api/isoline-functions/#isoline-functions) to calculate the travel distance for a defined area. These features are useful for geospatial analysis and the results can be saved, and stored, for additional location data service operations. + +**Note:** Based on your account plan, some of these data services are subject to different [quota limitations](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/#quota-information). + +_The Data Services API is collaborating with Mapzen, and several other geospatial service providers, in order to supply the best location data services from within our CartoDB Platform._ + +## General Concepts + +By using the SQL API to query the Data Services API functions, you can manage specific operations and the corresponding geometries (a `polygon` or a `point`), according to the input information. + +The Data Services API decouples the geocoding and isoline services from the CartoDB Editor. The API allows you to geocode data (from single rows, complete datasets, or simple inputs) and to perform trade areas analysis (computing isodistances or isochrones) programatically, through authenticated requests. + +The geometries provided by this API are projected in the projection [WGS 84 SRID 4326](http://spatialreference.org/ref/epsg/wgs-84/). + +**Note:** The Data Services API [geocoding functions]((http://docs.cartodb.com/cartodb-platform/dataservices-api/geocoding-functions/#geocoding-functions) return different types of geometries (points or polygons) as result of different geocoding processes. The CartoDB Platform does not support multi-geometry layers or datasets, therefore you must confirm that you are using consistent geometry types inside a table, to avoid future conflicts in your map visualization. + +## Authentication + +All requests performed to the CartoDB Data Services API must be authenticated with the user API Key. For more information about where to find your API Key, and how to authenticate your SQL API requests, view the [SQL API authentication](/cartodb-platform/sql-api/authentication/) documentation. + +## Errors + +Errors are described in the response of the request. An example is as follows: + +```json +{ + error: [ + "The api_key must be provided" + ] +} +``` + +Since the Data Services API is used on top of the CartoDB SQL API, you can refer to the [Making calls to the SQL API](/cartodb-platform/sql-api/making-calls/) documentation for help debugging your SQL errors. + +If the requested information is not in the CartoDB geocoding database, or if CartoDB is unable to recognize your input and match it with a result, the geocoding function returns `null` as a result. + +## Limits + +Usage of the Data Services API is subject to the CartoDB SQL API limits, stated in our [Terms of Service](https://cartodb.com/terms/#excessive). diff --git a/doc/quickstart.md b/doc/quickstart.md deleted file mode 100644 index a983a4e..0000000 --- a/doc/quickstart.md +++ /dev/null @@ -1,37 +0,0 @@ -# Quickstart - -If you are using the set of APIs and libraries that CartoDB offers, and you are handling your data with the SQL API, you can make your data visible in your maps by geocoding the dataset programatically. The set of isoline functions allow you to calculate the area which can be reached by travelling a given distance or time, useful for geospatial analysis, such as Trade Area Analysis. - -Here is an example of how to geocode a single country: - -```bash -https://{username}.cartodb.com/api/v2/sql?q=SELECT cdb_geocode_admin0_polygon('USA')&api_key={Your API key} -``` - -In order to geocode an existent CartoDB dataset, an SQL UPDATE statement must be used to populate the geometry column in the dataset with the results of the Geocoding API. For example, if the column where you are storing the country names for each one of our rows is called `country_column`, run the following statement in order to geocode the dataset: - -```bash -https://{username}.cartodb.com/api/v2/sql?q=UPDATE {tablename} SET the_geom = cdb_geocode_admin0_You can use the isoline functions to retrieve, for example, isochrone lines from a certain location, specifying the mode and the ranges that will define each of the isolines. The following query calculates isolines for areas that are 5, 10 and 15 minutes (300, 600 and 900 seconds, respectively) away from the location by following a path defined by car routing. -polygon({country_column})&api_key={Your API key} -``` - -```bash -https://{username}.cartodb.com/api/v2/sql?q=SELECT cdb_isochrone('POINT(-3.70568 40.42028)'::geometry, 'car', ARRAY[300,600,900]::integer[])&api_key={Your API key} -``` - -Notice that you can make use of Postgres or PostGIS functions in your Data Services API requests, as the result is a geometry that can be handled by the system. For example, suppose you need to retrieve the centroid of a specific country, you can wrap the resulting geometry from the geocoder functions inside the PostGIS `ST_Centroid` function: - -```bash -https://{username}.cartodb.com/api/v2/sql?q=SELECT ST_Centroid(cdb_geocode_admin0_polygon('USA'))&api_key={Your API key} -``` - -## Using Mapzen Services - -You can use Mapzen as the service provider for [geocoding](http://docs.cartodb.com/cartodb-platform/dataservices-api/#geocoding-functions) and [routing](http://docs.cartodb.com/cartodb-platform/dataservices-api/#routing-functions) with CartoDB. This enables you to take advantage of the [geocoding search](https://mapzen.com/documentation/search/) features, and the [turn-by-turn routing](https://mapzen.com/documentation/turn-by-turn/) service that Mapzen offers. To use these features through CartoDB, all you need is a Mapzen API Key. - -Integration with Mapzen varies, depending on your account plan: - -- Enterprise account users will receive a Mapzen API Key through CartoDB -- All other account plans can go to the [Mapzen Developers page](https://mapzen.com/developers/sign_in) to retrieve an API key. This is a free integration that allows you to access the Mapzen services by connecting your GitHub account - -**Tip** You can also use [Mapzen basemaps](https://mapzen.com/documentation/vector-tiles/) by integrating with their API. This is useful is you want to include a vector tile service basemap with your CartoDB map. To include their external basemaps, define the URL and Mapzen attributions in the [HTTP data layer of your MapConfig](http://docs.cartodb.com/cartodb-platform/maps-api/mapconfig/#http-layer-options) file. Currently, Mapzen vector tile basemaps are only supported via the API, and are not available through the CartoDB Editor. diff --git a/doc/quota_information.md b/doc/quota_information.md index d3cfaba..917af9a 100644 --- a/doc/quota_information.md +++ b/doc/quota_information.md @@ -1,17 +1,11 @@ -# Quota information +# Quota Information -**This Data Services API provides functions which are subject to quota limitations, and extra fees may apply**. Please check our [terms and conditions](https://cartodb.com/terms/). +**Based on your account plan, some of the Data Services API functions are subject to quota limitations and extra fees may apply.** View our [terms and conditions](https://cartodb.com/terms/), or [contact us](mailto:sales@cartodb.com) for details about which functions require service credits to your account. -The functions that require service credits to be used are as follows: +## Quota Consumption -* cdb_geocode_street_point(_search_text text, [city text], [state text], [country text]_); from [Geocoding functions](http://docs.cartodb.com/cartodb-platform/dataservices-api/geocoding-functions/) -* cdb_isodistance(_source geometry, mode text, range integer[], [options text[]]_); from [Isoline functions](http://docs.cartodb.com/cartodb-platform/dataservices-api/isoline-functions/) -* cdb_isochrone(_source geometry, mode text, range integer[], [options text[]]_); from [Isoline functions](http://docs.cartodb.com/cartodb-platform/dataservices-api/isoline-functions/) +Quota consumption is calculated based on the number of request made for each function. Be mindful of the following usage recommendations when using the Data Services API functions: -## Quota consumption information and usage recommendations - -Be mindful of the following when using the abovementioned functions: - -* One credit per function call will be consumed, and the results are not cached. If the query is applied to a _N_ rows dataset, then _N_ credits will be used. -* You are discouraged from using dynamic queries to these functions in your maps. This can result in credits consumption per map view. **Note:** Queries to the Data Services API and any of its functions in your maps may be forbidden in the future. -* You are advised to store results of these queries into your datasets and refresh them as needed, so that you can have finer control on your credits' usage. +* One credit per function call will be consumed. The results are not cached. If the query is applied to a _N_ rows dataset, then _N_ credits are consumed +* Avoid running dynamic queries to these functions in your maps. This can result in credit consumption per map view. **Note:** Queries to the Data Services API, and any of its functions in your maps, may be forbidden in the future +* It is advised to store results of these queries into your datasets, and refresh them as needed. This ensure more control of quota credits for your account From 6bd854a395a665d54046325721541d7dbc5d8ea6 Mon Sep 17 00:00:00 2001 From: csobier Date: Tue, 12 Apr 2016 19:15:51 -0400 Subject: [PATCH 10/22] added more geocoding funtion descriptions --- doc/geocoding_functions.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index d15b7a4..ddf1580 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -1,6 +1,6 @@ # Geocoding Functions -The geocoder functions allow you to match your data with geometries on your map. This geocoding service can be used programatically to geocode datasets via the CartoDB SQL API. It is fed from _Open Data_ and it serves geometries for countries, provinces, states, cities, postal codes, IP addresses and street addresses. Geocoding functions through CartoDB are available by requesting a single function in the Data Services API. +The [geocoder](https://cartodb.com/data/geocoder-api/) functions allow you to match your data with geometries on your map. This geocoding service can be used programatically to geocode datasets via the CartoDB SQL API. It is fed from _Open Data_ and it serves geometries for countries, provinces, states, cities, postal codes, IP addresses and street addresses. CartoDB provides functions for several different categories of geocoding through the Data Services API. **This service is subject to quota limitations, and extra fees may apply**. View the [Quota Information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) section for details, and recommendations, about to quota consumption. @@ -21,9 +21,9 @@ https://{username}.cartodb.com/api/v2/sql?q=UPDATE {tablename} SET the_geom = cd The following geocoding functions are available, grouped by categories. -## Country geocoder +## Country Geocoder -This function provides a country geocoding service. It recognizes the names of the different countries from different synonyms, such as their English name, their endonym, or their ISO2 or ISO3 codes. +This function geocodes country names by transforming them into country border geometries. It recognizes the names of the different countries either by different synonyms (such as their English name or their endonym), or by ISO (ISO2 or ISO3) codes. ### cdb_geocode_admin0_polygon(_country_name text_) @@ -52,9 +52,9 @@ UPDATE {tablename} SET the_geom = cdb_geocode_admin0_polygon({country_column}) ``` -## Level-1 Administrative regions geocoder +## Level-1 Administrative Regions Geocoder -The following functions provide a geocoding service for administrative regions of level 1 (or NUTS-1) such as states for the United States, regions in France or autonomous communities in Spain. +This function geocodes the [Level 1](https://en.wikipedia.org/wiki/Table_of_administrative_divisions_by_country), or [NUTS-1](https://en.wikipedia.org/wiki/NUTS_1_statistical_regions_of_England), administrative divisions (or units) of countries and transforms them into polygon geometries. For example, a "state" in the United States, a region in France, or an autonomous community in Spain. ### cdb_geocode_admin1_polygon(_admin1_name text_) @@ -110,9 +110,9 @@ UPDATE {tablename} SET the_geom = cdb_geocode_admin1_polygon({province_column}, ``` -## City geocoder +## City Geocoder -The following functions provide a city geocoder service. It is recommended to use the more specific geocoding function -- the one that requires more parameters — in order for the result to be as accurate as possible when several cities share their name. +This fuction geocodes the names of cities and transforms them to a point geometries. It is recommended to use geocoding functions that require more parameters — in order for the result to be as accurate as possible when several cities share their name. If there are duplicate results for a city name, the city name with the highest population will be returned. ### cdb_geocode_namedplace_point(_city_name text_) @@ -195,9 +195,9 @@ SELECT cdb_geocode_namedplace_point('New York', 'New York', 'USA') UPDATE {tablename} SET the_geom = cdb_geocode_namedplace_point({city_column}, {province_column}, 'USA') ``` -## Postal codes geocoder +## Postal Code Geocoder -The following functions provide a postal code geocoding service that can be used to obtain points or polygon results. The postal code polygon geocoder covers the United States, France, Australia and Canada; a request for a different country will return an empty response. +This function geocodes postal codes and country names and transforms them to points or polygon geometries. The postal code polygon geocoder covers the United States, France, Australia and Canada; a request for a different country will return an empty response. ### cdb_geocode_postalcode_polygon(_postal_code text, country_name text_) @@ -255,9 +255,9 @@ SELECT cdb_geocode_postalcode_point('11211', 'USA') UPDATE {tablename} SET the_geom = cdb_geocode_postalcode_point({postal_code_column}, 'USA') ``` -## IP addresses geocoder +## IP Addresses Geocoder -This function provides an IP address geocoding service, for both IPv4 and IPv6 addresses. +This function geocodes both IPv4, and IPv6, IP addresses and transforms them into point geometries. This is useful if you are analyzing location based data, based on a set of user's IP addresses. ### cdb_geocode_ipaddress_point(_ip_address text_) @@ -286,11 +286,11 @@ SELECT cdb_geocode_ipaddress_point('102.23.34.1') UPDATE {tablename} SET the_geom = cdb_geocode_ipaddress_point('102.23.34.1') ``` -## Street-level geocoder +## Street-Level Geocoder -This function provides a street-level geocoding service. This service uses the street level geocoder defined for the user. +This function geocodes street addresses and transforms them into point geometries. CartoDB uses several different service providers for street-level geocoding, depending on your platform. If you access CartoDB on a Google Cloud Platform, [Google Maps geocoding](https://developers.google.com/maps/documentation/geocoding/intro) is applied. All other platform users are provided with [HERE geocoding services](https://developer.here.com/rest-apis/documentation/geocoder/topics/quick-start.html). Additional service providers will implemented in the future. -**This service is subject to quota limitations, and extra fees may apply**. Please view our [terms and conditions](https://cartodb.com/terms/) and check out the [Quota information section](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) for details and recommendations related with quota usage. +**This service is subject to quota limitations, and extra fees may apply**. View the [Quota information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) for details and recommendations about quota consumption. ### cdb_geocode_street_point(_search_text text, [city text], [state text], [country text]_) @@ -325,4 +325,4 @@ SELECT cdb_geocode_street_point('651 Lombard Street San Francisco California', N ```bash UPDATE {tablename} SET the_geom = cdb_geocode_street_point({street_name_column}) -``` \ No newline at end of file +``` From 0b53ede06c3e30cb552ea97b5f248a4c4ff32196 Mon Sep 17 00:00:00 2001 From: csobier Date: Tue, 12 Apr 2016 19:41:34 -0400 Subject: [PATCH 11/22] applied some formatting changes --- doc/geocoding_functions.md | 5 +---- doc/isoline_functions.md | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index ddf1580..4619b51 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -2,10 +2,7 @@ The [geocoder](https://cartodb.com/data/geocoder-api/) functions allow you to match your data with geometries on your map. This geocoding service can be used programatically to geocode datasets via the CartoDB SQL API. It is fed from _Open Data_ and it serves geometries for countries, provinces, states, cities, postal codes, IP addresses and street addresses. CartoDB provides functions for several different categories of geocoding through the Data Services API. -**This service is subject to quota limitations, and extra fees may apply**. View the [Quota Information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) section for details, and recommendations, about to quota consumption. - - -## Quickstart + **This service is subject to quota limitations, and extra fees may apply**. View the [Quota Information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) section for details, and recommendations, about to quota consumption. Here is an example of how to geocode a single country: diff --git a/doc/isoline_functions.md b/doc/isoline_functions.md index eec74f6..2c2de96 100644 --- a/doc/isoline_functions.md +++ b/doc/isoline_functions.md @@ -2,9 +2,7 @@ [Isolines](https://cartodb.com/data/isolines/) are contoured lines that display calculated levels over a given surface area. This enables you to view polygon dimensions by forward or reverse measurements. Isoline functions are calculated as the intersection of areas from the origin point, measured by distance (isodistance) or time (isochrone). For example, the distance of a road from a sidewalk. Isoline functions through CartoDB are available by requesting a single function in the Data Services API. -**This service is subject to quota limitations, and extra fees may apply**. View the [Quota Information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) section for details, and recommendations, about to quota consumption. - -## Quickstart + **This service is subject to quota limitations, and extra fees may apply**. View the [Quota Information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) section for details, and recommendations, about to quota consumption. You can use the isoline functions to retrieve, for example, isochrone lines from a certain location, specifying the mode and the ranges that will define each of the isolines. The following query calculates isolines for areas that are 5, 10 and 15 minutes (300, 600 and 900 seconds, respectively) away from the location by following a path defined by car routing. polygon({country_column})&api_key={api_key} From 2c8cfa3032a6b4943b3c8363a668358fe09d5a1d Mon Sep 17 00:00:00 2001 From: csobier Date: Tue, 12 Apr 2016 19:50:30 -0400 Subject: [PATCH 12/22] hyperlink fix --- doc/overview.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/overview.md b/doc/overview.md index 83378cc..475ba4b 100644 --- a/doc/overview.md +++ b/doc/overview.md @@ -6,7 +6,7 @@ By using CartoDB libraries and the SQL API, you can apply location data services _The Data Services API is collaborating with Mapzen, and several other geospatial service providers, in order to supply the best location data services from within our CartoDB Platform._ -## General Concepts +## Data Services Integration By using the SQL API to query the Data Services API functions, you can manage specific operations and the corresponding geometries (a `polygon` or a `point`), according to the input information. @@ -14,7 +14,7 @@ The Data Services API decouples the geocoding and isoline services from the Cart The geometries provided by this API are projected in the projection [WGS 84 SRID 4326](http://spatialreference.org/ref/epsg/wgs-84/). -**Note:** The Data Services API [geocoding functions]((http://docs.cartodb.com/cartodb-platform/dataservices-api/geocoding-functions/#geocoding-functions) return different types of geometries (points or polygons) as result of different geocoding processes. The CartoDB Platform does not support multi-geometry layers or datasets, therefore you must confirm that you are using consistent geometry types inside a table, to avoid future conflicts in your map visualization. +**Note:** The Data Services API [geocoding functions](http://docs.cartodb.com/cartodb-platform/dataservices-api/geocoding-functions/#geocoding-functions) return different types of geometries (points or polygons) as result of different geocoding processes. The CartoDB Platform does not support multi-geometry layers or datasets, therefore you must confirm that you are using consistent geometry types inside a table, to avoid future conflicts in your map visualization. ## Authentication From f223ad9ca0b98c1dea1a4be234182136ca36dc2f Mon Sep 17 00:00:00 2001 From: csobier Date: Tue, 12 Apr 2016 19:54:13 -0400 Subject: [PATCH 13/22] fixing indentation --- doc/geocoding_functions.md | 2 +- doc/isoline_functions.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 4619b51..ef529df 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -2,7 +2,7 @@ The [geocoder](https://cartodb.com/data/geocoder-api/) functions allow you to match your data with geometries on your map. This geocoding service can be used programatically to geocode datasets via the CartoDB SQL API. It is fed from _Open Data_ and it serves geometries for countries, provinces, states, cities, postal codes, IP addresses and street addresses. CartoDB provides functions for several different categories of geocoding through the Data Services API. - **This service is subject to quota limitations, and extra fees may apply**. View the [Quota Information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) section for details, and recommendations, about to quota consumption. +_**This service is subject to quota limitations, and extra fees may apply**. View the [Quota Information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) section for details, and recommendations, about to quota consumption._ Here is an example of how to geocode a single country: diff --git a/doc/isoline_functions.md b/doc/isoline_functions.md index 2c2de96..1567a22 100644 --- a/doc/isoline_functions.md +++ b/doc/isoline_functions.md @@ -2,7 +2,7 @@ [Isolines](https://cartodb.com/data/isolines/) are contoured lines that display calculated levels over a given surface area. This enables you to view polygon dimensions by forward or reverse measurements. Isoline functions are calculated as the intersection of areas from the origin point, measured by distance (isodistance) or time (isochrone). For example, the distance of a road from a sidewalk. Isoline functions through CartoDB are available by requesting a single function in the Data Services API. - **This service is subject to quota limitations, and extra fees may apply**. View the [Quota Information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) section for details, and recommendations, about to quota consumption. +_**This service is subject to quota limitations, and extra fees may apply**. View the [Quota Information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) section for details, and recommendations, about to quota consumption._ You can use the isoline functions to retrieve, for example, isochrone lines from a certain location, specifying the mode and the ranges that will define each of the isolines. The following query calculates isolines for areas that are 5, 10 and 15 minutes (300, 600 and 900 seconds, respectively) away from the location by following a path defined by car routing. polygon({country_column})&api_key={api_key} From 7e8d666c8c0d40020f46934037925c74b3205a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20=C3=81lvarez=20Leiva?= Date: Wed, 13 Apr 2016 13:14:25 +0200 Subject: [PATCH 14/22] Update geocoding_functions.md --- doc/geocoding_functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index ef529df..7fa872d 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -189,7 +189,7 @@ SELECT cdb_geocode_namedplace_point('New York', 'New York', 'USA') ##### Update ```bash -UPDATE {tablename} SET the_geom = cdb_geocode_namedplace_point({city_column}, {province_column}, 'USA') +UPDATE {tablename} SET the_geom = cdb_geocode_namedplace_point({city_column}, {provinhttps://team.cartodb.com/u/matallo/viz/3ed93c04-0038-11e6-b597-0ea31932ec1d/embed_mapce_column}, 'USA') ``` ## Postal Code Geocoder @@ -285,7 +285,7 @@ UPDATE {tablename} SET the_geom = cdb_geocode_ipaddress_point('102.23.34.1') ## Street-Level Geocoder -This function geocodes street addresses and transforms them into point geometries. CartoDB uses several different service providers for street-level geocoding, depending on your platform. If you access CartoDB on a Google Cloud Platform, [Google Maps geocoding](https://developers.google.com/maps/documentation/geocoding/intro) is applied. All other platform users are provided with [HERE geocoding services](https://developer.here.com/rest-apis/documentation/geocoder/topics/quick-start.html). Additional service providers will implemented in the future. +This function geocodes street addresses and transforms them into point geometries. CartoDB uses several different service providers for street-level geocoding, depending on your platform. If you access CartoDB on a Google Cloud Platform, [Google Maps geocoding](https://developers.google.com/maps/documentation/geocoding/intro) is applied. All other platform users are provided with [HERE geocoding services](https://developer.here.com/rest-apis/documentation/geocoder/topics/quick-start.html). Additional service providers will be implemented in the future. **This service is subject to quota limitations, and extra fees may apply**. View the [Quota information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) for details and recommendations about quota consumption. From 3c1250ee72cfe7b15a318b63cf9aa887bd6990d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20=C3=81lvarez=20Leiva?= Date: Wed, 13 Apr 2016 13:16:24 +0200 Subject: [PATCH 15/22] Update overview.md --- doc/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/overview.md b/doc/overview.md index 475ba4b..3c59ef9 100644 --- a/doc/overview.md +++ b/doc/overview.md @@ -4,7 +4,7 @@ By using CartoDB libraries and the SQL API, you can apply location data services **Note:** Based on your account plan, some of these data services are subject to different [quota limitations](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/#quota-information). -_The Data Services API is collaborating with Mapzen, and several other geospatial service providers, in order to supply the best location data services from within our CartoDB Platform._ +_The Data Services API is collaborating with [Mapzen](https://mapzen.com/), and several other geospatial service providers, in order to supply the best location data services from within our CartoDB Platform._ ## Data Services Integration From d18eb9557567cd956902e3f936c28e0ffd6a2dd7 Mon Sep 17 00:00:00 2001 From: csobier Date: Wed, 13 Apr 2016 12:21:38 -0400 Subject: [PATCH 16/22] clarified equalness in isolines --- doc/geocoding_functions.md | 2 +- doc/isoline_functions.md | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 7fa872d..93b528f 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -10,7 +10,7 @@ Here is an example of how to geocode a single country: https://{username}.cartodb.com/api/v2/sql?q=SELECT cdb_geocode_admin0_polygon('USA')&api_key={api_key} ``` -In order to geocode an existent CartoDB dataset, an SQL UPDATE statement must be used to populate the geometry column in the dataset with the results of the Geocoding API. For example, if the column where you are storing the country names for each one of our rows is called `country_column`, run the following statement in order to geocode the dataset: +In order to geocode an existent CartoDB dataset, an SQL UPDATE statement must be used to populate the geometry column in the dataset with the results of the Data Services API. For example, if the column where you are storing the country names for each one of our rows is called `country_column`, run the following statement in order to geocode the dataset: ```bash https://{username}.cartodb.com/api/v2/sql?q=UPDATE {tablename} SET the_geom = cdb_geocode_admin0_ diff --git a/doc/isoline_functions.md b/doc/isoline_functions.md index 1567a22..992ec98 100644 --- a/doc/isoline_functions.md +++ b/doc/isoline_functions.md @@ -1,6 +1,6 @@ # Isoline Functions -[Isolines](https://cartodb.com/data/isolines/) are contoured lines that display calculated levels over a given surface area. This enables you to view polygon dimensions by forward or reverse measurements. Isoline functions are calculated as the intersection of areas from the origin point, measured by distance (isodistance) or time (isochrone). For example, the distance of a road from a sidewalk. Isoline functions through CartoDB are available by requesting a single function in the Data Services API. +[Isolines](https://cartodb.com/data/isolines/) are contoured lines that display equally calculated levels over a given surface area. This enables you to view polygon dimensions by forward or reverse measurements. Isoline functions are calculated as the intersection of areas from the origin point, measured by distance (isodistance) or time (isochrone). For example, the distance of a road from a sidewalk. Isoline services through CartoDB are available by requesting a single function in the Data Services API. _**This service is subject to quota limitations, and extra fees may apply**. View the [Quota Information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) section for details, and recommendations, about to quota consumption._ @@ -21,6 +21,8 @@ The following functions provide an isoline generator service, based on time or d ## cdb_isodistance(_source geometry, mode text, range integer[], [options text[]]_) +Displays a contoured line on a map, connecting points to a defined area, measured by an equal range of distance (in meters). + #### Arguments Name | Type | Description | Accepted values @@ -65,6 +67,8 @@ INSERT INTO {table} (the_geom) SELECT (cdb_isodistance(the_geom, 'walk', string_ ## cdb_isochrone(_source geometry, mode text, range integer[], [options text[]]_) +Displays a contoured line on a map, connecting points to a defined area, measured by an equal range of time (in seconds). + #### Arguments This function uses the same parameters and information as the `cdb_isodistance` function, with the exception that the range is measured in seconds instead of meters. From 1fbab0617fc9e71860a8e1818985b67020c8a261 Mon Sep 17 00:00:00 2001 From: csobier Date: Wed, 13 Apr 2016 12:32:00 -0400 Subject: [PATCH 17/22] change point to geometries --- doc/isoline_functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/isoline_functions.md b/doc/isoline_functions.md index 992ec98..3077260 100644 --- a/doc/isoline_functions.md +++ b/doc/isoline_functions.md @@ -21,7 +21,7 @@ The following functions provide an isoline generator service, based on time or d ## cdb_isodistance(_source geometry, mode text, range integer[], [options text[]]_) -Displays a contoured line on a map, connecting points to a defined area, measured by an equal range of distance (in meters). +Displays a contoured line on a map, connecting geometries to a defined area, measured by an equal range of distance (in meters). #### Arguments @@ -67,7 +67,7 @@ INSERT INTO {table} (the_geom) SELECT (cdb_isodistance(the_geom, 'walk', string_ ## cdb_isochrone(_source geometry, mode text, range integer[], [options text[]]_) -Displays a contoured line on a map, connecting points to a defined area, measured by an equal range of time (in seconds). +Displays a contoured line on a map, connecting geometries to a defined area, measured by an equal range of time (in seconds). #### Arguments From 6eb8df2955c0e8de5321518e72f9ade626d60738 Mon Sep 17 00:00:00 2001 From: csobier Date: Wed, 13 Apr 2016 13:28:42 -0400 Subject: [PATCH 18/22] removed typo from copypaste review, and added more descriptions for geocoding functions --- doc/geocoding_functions.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 93b528f..7b8ff3a 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -24,6 +24,8 @@ This function geocodes country names by transforming them into country border ge ### cdb_geocode_admin0_polygon(_country_name text_) +Geocodes a country name into a polygon data. + #### Arguments Name | Type | Description @@ -55,6 +57,8 @@ This function geocodes the [Level 1](https://en.wikipedia.org/wiki/Table_of_admi ### cdb_geocode_admin1_polygon(_admin1_name text_) +Geocodes Level-1 administrative regions into polygon data. + #### Arguments Name | Type | Description @@ -81,6 +85,8 @@ UPDATE {tablename} SET the_geom = cdb_geocode_admin1_polygon({province_column}) ### cdb_geocode_admin1_polygon(_admin1_name text, country_name text_) +Geocodes Level-1 administrative regions, and country names, into polygon data. + #### Arguments Name | Type | Description @@ -109,10 +115,12 @@ UPDATE {tablename} SET the_geom = cdb_geocode_admin1_polygon({province_column}, ## City Geocoder -This fuction geocodes the names of cities and transforms them to a point geometries. It is recommended to use geocoding functions that require more parameters — in order for the result to be as accurate as possible when several cities share their name. If there are duplicate results for a city name, the city name with the highest population will be returned. +This function geocodes the names of cities and transforms them to a point geometries. It is recommended to use geocoding functions that require more defined parameters — this returns more accurate results when several cities have the same name. _If there are duplicate results for a city name, the city name with the highest population will be returned._ ### cdb_geocode_namedplace_point(_city_name text_) +Geocodes city names into point data. + #### Arguments Name | Type | Description @@ -139,6 +147,8 @@ UPDATE {tablename} SET the_geom = cdb_geocode_namedplace_point({city_column}) ### cdb_geocode_namedplace_point(_city_name text, country_name text_) +Geocodes city names, and country names, into point data. + #### Arguments Name | Type | Description @@ -166,6 +176,8 @@ UPDATE {tablename} SET the_geom = cdb_geocode_namedplace_point({city_column}, 'S ### cdb_geocode_namedplace_point(_city_name text, admin1_name text, country_name text_) +Geocodes city names, level-1 administrative regions, and country names into point data. This is recommended for the most accurate geocoding of city data. + #### Arguments Name | Type | Description @@ -189,7 +201,7 @@ SELECT cdb_geocode_namedplace_point('New York', 'New York', 'USA') ##### Update ```bash -UPDATE {tablename} SET the_geom = cdb_geocode_namedplace_point({city_column}, {provinhttps://team.cartodb.com/u/matallo/viz/3ed93c04-0038-11e6-b597-0ea31932ec1d/embed_mapce_column}, 'USA') +UPDATE {tablename} SET the_geom = cdb_geocode_namedplace_point({city_column}, {province_column}, 'USA') ``` ## Postal Code Geocoder @@ -198,6 +210,8 @@ This function geocodes postal codes and country names and transforms them to poi ### cdb_geocode_postalcode_polygon(_postal_code text, country_name text_) +Geocodes the postal code, and country name, into polygon data. + #### Arguments Name | Type | Description @@ -227,6 +241,8 @@ UPDATE {tablename} SET the_geom = cdb_geocode_postalcode_polygon({postal_code_co ### cdb_geocode_postalcode_point(_code text, country_name text_) +Geocodes postal codes, and country names, into point data. + #### Arguments Name | Type | Description @@ -258,6 +274,8 @@ This function geocodes both IPv4, and IPv6, IP addresses and transforms them int ### cdb_geocode_ipaddress_point(_ip_address text_) +Geocodes IP addresses, and country names into point data. + #### Arguments Name | Type | Description @@ -291,6 +309,8 @@ This function geocodes street addresses and transforms them into point geometrie ### cdb_geocode_street_point(_search_text text, [city text], [state text], [country text]_) +Geocodes a complete street address into point data. + #### Arguments Name | Type | Description From 9fce6b558bcc23250d51f64d35ac198a792a0304 Mon Sep 17 00:00:00 2001 From: csobier Date: Fri, 15 Apr 2016 07:29:53 -0400 Subject: [PATCH 19/22] applied update for DataServices API issue#145 --- doc/geocoding_functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 7b8ff3a..34b0dde 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -53,7 +53,7 @@ UPDATE {tablename} SET the_geom = cdb_geocode_admin0_polygon({country_column}) ## Level-1 Administrative Regions Geocoder -This function geocodes the [Level 1](https://en.wikipedia.org/wiki/Table_of_administrative_divisions_by_country), or [NUTS-1](https://en.wikipedia.org/wiki/NUTS_1_statistical_regions_of_England), administrative divisions (or units) of countries and transforms them into polygon geometries. For example, a "state" in the United States, a region in France, or an autonomous community in Spain. +This function geocodes the [Level 1](https://en.wikipedia.org/wiki/Table_of_administrative_divisions_by_country), or [NUTS-1](https://en.wikipedia.org/wiki/NUTS_1_statistical_regions_of_England), administrative divisions (or units) of countries and transforms them into polygon geometries. For example, a "state" in the United States, "départements" in France, or an autonomous community in Spain. ### cdb_geocode_admin1_polygon(_admin1_name text_) From 3ed89c09d571397bd01b00ab8596e36b1fa0fb05 Mon Sep 17 00:00:00 2001 From: csobier Date: Fri, 15 Apr 2016 13:41:24 -0400 Subject: [PATCH 20/22] clarified actual behavior of geocoding descriptions --- doc/geocoding_functions.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 91b0a46..4ed456c 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -24,7 +24,7 @@ This function geocodes country names by transforming them into country border ge ### cdb_geocode_admin0_polygon(_country_name text_) -Geocodes a country name into a polygon data. +Geocodes the text name of a country into a country_name geometry, displayed as polygon data. #### Arguments @@ -57,7 +57,7 @@ This function geocodes the [Level 1](https://en.wikipedia.org/wiki/Table_of_admi ### cdb_geocode_admin1_polygon(_admin1_name text_) -Geocodes Level-1 administrative regions into polygon data. +Geocodes the name of the province/state into a Level-1 administrative region, displayed as a polygon geometry. #### Arguments @@ -85,7 +85,7 @@ UPDATE {tablename} SET the_geom = cdb_geocode_admin1_polygon({province_column}) ### cdb_geocode_admin1_polygon(_admin1_name text, country_name text_) -Geocodes Level-1 administrative regions, and country names, into polygon data. +Geocodes the name of the province/state for a specified country into a Level-1 administrative region, displayed as a polygon geometry. #### Arguments @@ -119,7 +119,7 @@ This function geocodes the names of cities and transforms them to a point geomet ### cdb_geocode_namedplace_point(_city_name text_) -Geocodes city names into point data. +Geocodes the text name of a city into a named place geometry, displayed as point data. #### Arguments @@ -147,7 +147,7 @@ UPDATE {tablename} SET the_geom = cdb_geocode_namedplace_point({city_column}) ### cdb_geocode_namedplace_point(_city_name text, country_name text_) -Geocodes city names, and country names, into point data. +Geocodes the text name of a city for a specified country into a named place point geometry. #### Arguments @@ -176,8 +176,7 @@ UPDATE {tablename} SET the_geom = cdb_geocode_namedplace_point({city_column}, 'S ### cdb_geocode_namedplace_point(_city_name text, admin1_name text, country_name text_) -Geocodes city names, level-1 administrative regions, and country names into point data. This is recommended for the most accurate geocoding of city data. - +Geocodes the text name of a city, for a specified province/state and country, into a named place point geometry. This is recommended for the most accurate geocoding of city data. #### Arguments Name | Type | Description @@ -212,7 +211,7 @@ This function geocodes postal codes and country names and transforms them to poi ### cdb_geocode_postalcode_polygon(_postal_code text, country_name text_) -Geocodes the postal code, and country name, into polygon data. +Goecodes the postal code for a specified country into a **polygon** geometry. #### Arguments @@ -241,7 +240,7 @@ UPDATE {tablename} SET the_geom = cdb_geocode_postalcode_polygon({postal_code_co ### cdb_geocode_postalcode_point(_code text, country_name text_) -Geocodes postal codes, and country names, into point data. +Goecodes the postal code for a specified country into a **point** geometry. #### Arguments @@ -274,7 +273,7 @@ This function geocodes both IPv4, and IPv6, IP addresses and transforms them int ### cdb_geocode_ipaddress_point(_ip_address text_) -Geocodes IP addresses, and country names into point data. +Geocodes a postal code from a specified country into an IP address, displayed as a point geometry. #### Arguments @@ -309,7 +308,7 @@ This function geocodes street addresses and transforms them into point geometrie ### cdb_geocode_street_point(_search_text text, [city text], [state text], [country text]_) -Geocodes a complete street address into point data. +Geocodes a complete address into a single street geometry, displayed as point data. #### Arguments From 5ac9bd884f5e6a9328bf7d1d9d7f60aa167d19a1 Mon Sep 17 00:00:00 2001 From: csobier Date: Mon, 18 Apr 2016 08:46:05 -0400 Subject: [PATCH 21/22] what about the SELECT examples for street? --- doc/geocoding_functions.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 4ed456c..864215e 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -20,7 +20,7 @@ The following geocoding functions are available, grouped by categories. ## Country Geocoder -This function geocodes country names by transforming them into country border geometries. It recognizes the names of the different countries either by different synonyms (such as their English name or their endonym), or by ISO (ISO2 or ISO3) codes. +This function geocodes your data into country border geometries. It recognizes the names of the different countries either by different synonyms (such as their English name or their endonym), or by ISO (ISO2 or ISO3) codes. ### cdb_geocode_admin0_polygon(_country_name text_) @@ -53,7 +53,7 @@ UPDATE {tablename} SET the_geom = cdb_geocode_admin0_polygon({country_column}) ## Level-1 Administrative Regions Geocoder -This function geocodes the [Level 1](https://en.wikipedia.org/wiki/Table_of_administrative_divisions_by_country), or [NUTS-1](https://en.wikipedia.org/wiki/NUTS_1_statistical_regions_of_England), administrative divisions (or units) of countries and transforms them into polygon geometries. For example, a "state" in the United States, "départements" in France, or an autonomous community in Spain. +This function geocodes your data into polygon geometries for [Level 1](https://en.wikipedia.org/wiki/Table_of_administrative_divisions_by_country), or [NUTS-1](https://en.wikipedia.org/wiki/NUTS_1_statistical_regions_of_England), administrative divisions (or units) of countries. For example, a "state" in the United States, "départements" in France, or an autonomous community in Spain. ### cdb_geocode_admin1_polygon(_admin1_name text_) @@ -115,7 +115,7 @@ UPDATE {tablename} SET the_geom = cdb_geocode_admin1_polygon({province_column}, ## City Geocoder -This function geocodes the names of cities and transforms them to a point geometries. It is recommended to use geocoding functions that require more defined parameters — this returns more accurate results when several cities have the same name. _If there are duplicate results for a city name, the city name with the highest population will be returned._ +This function geocodes your data into point geometries for names of cities. It is recommended to use geocoding functions that require more defined parameters — this returns more accurate results when several cities have the same name. _If there are duplicate results for a city name, the city name with the highest population will be returned._ ### cdb_geocode_namedplace_point(_city_name text_) @@ -176,7 +176,7 @@ UPDATE {tablename} SET the_geom = cdb_geocode_namedplace_point({city_column}, 'S ### cdb_geocode_namedplace_point(_city_name text, admin1_name text, country_name text_) -Geocodes the text name of a city, for a specified province/state and country, into a named place point geometry. This is recommended for the most accurate geocoding of city data. +Geocodes your data into a named place point geometry, containing the text name of a city, for a specified province/state and country. This is recommended for the most accurate geocoding of city data. #### Arguments Name | Type | Description @@ -205,7 +205,7 @@ UPDATE {tablename} SET the_geom = cdb_geocode_namedplace_point({city_column}, {p ## Postal Code Geocoder -This function geocodes postal codes and country names and transforms them to points or polygon geometries. The postal code polygon geocoder covers the United States, France, Australia and Canada; a request for a different country will return an empty response. +This function geocodes your data into point, or polygon, geometries for postal codes. The postal code polygon geocoder covers the United States, France, Australia and Canada; a request for a different country will return an empty response. **Note:** For the USA, US Census [Zip Code Tabulation Areas](https://www.census.gov/geo/reference/zctas.html) (ZCTA) are used to reference geocodes for USPS postal codes service areas. See the [FAQs](http://docs.cartodb.com/faqs/datasets-and-data/#why-does-cartodb-use-census-bureau-zctas-and-not-usps-zip-codes-for-postal-codes) about datasets and data for details. @@ -269,7 +269,7 @@ UPDATE {tablename} SET the_geom = cdb_geocode_postalcode_point({postal_code_colu ## IP Addresses Geocoder -This function geocodes both IPv4, and IPv6, IP addresses and transforms them into point geometries. This is useful if you are analyzing location based data, based on a set of user's IP addresses. +This function geocodes your data into point geometries for IP addresses. This is useful if you are analyzing location based data, based on a set of user's IP addresses. ### cdb_geocode_ipaddress_point(_ip_address text_) @@ -302,7 +302,7 @@ UPDATE {tablename} SET the_geom = cdb_geocode_ipaddress_point('102.23.34.1') ## Street-Level Geocoder -This function geocodes street addresses and transforms them into point geometries. CartoDB uses several different service providers for street-level geocoding, depending on your platform. If you access CartoDB on a Google Cloud Platform, [Google Maps geocoding](https://developers.google.com/maps/documentation/geocoding/intro) is applied. All other platform users are provided with [HERE geocoding services](https://developer.here.com/rest-apis/documentation/geocoder/topics/quick-start.html). Additional service providers will be implemented in the future. +This function geocodes your data into a point geometry for a street address. CartoDB uses several different service providers for street-level geocoding, depending on your platform. If you access CartoDB on a Google Cloud Platform, [Google Maps geocoding](https://developers.google.com/maps/documentation/geocoding/intro) is applied. All other platform users are provided with [HERE geocoding services](https://developer.here.com/rest-apis/documentation/geocoder/topics/quick-start.html). Additional service providers will be implemented in the future. **This service is subject to quota limitations, and extra fees may apply**. View the [Quota information](http://docs.cartodb.com/cartodb-platform/dataservices-api/quota-information/) for details and recommendations about quota consumption. From 4c5c31cfeac440c9e8774dba5fcae96d6344641f Mon Sep 17 00:00:00 2001 From: csobier Date: Mon, 18 Apr 2016 09:19:05 -0400 Subject: [PATCH 22/22] removed null select example, woo --- doc/geocoding_functions.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/geocoding_functions.md b/doc/geocoding_functions.md index 864215e..d4dffc2 100644 --- a/doc/geocoding_functions.md +++ b/doc/geocoding_functions.md @@ -334,7 +334,6 @@ SELECT cdb_geocode_street_point('651 Lombard Street, San Francisco, California, SELECT cdb_geocode_street_point('651 Lombard Street', 'San Francisco') SELECT cdb_geocode_street_point('651 Lombard Street', 'San Francisco', 'California') SELECT cdb_geocode_street_point('651 Lombard Street', 'San Francisco', 'California', 'United States') -SELECT cdb_geocode_street_point('651 Lombard Street San Francisco California', NULL, NULL, 'USA') ``` ##### Update