From b5cdeedb361a5db8315ab914d4501ac1c1d7b476 Mon Sep 17 00:00:00 2001 From: csobier Date: Tue, 16 Feb 2016 08:26:37 -0500 Subject: [PATCH] applied minor grammar edits --- doc/API.md | 2 +- doc/general_concepts.md | 4 ++-- doc/quickstart.md | 6 +++--- doc/routing_functions.md | 18 +++++++++--------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/API.md b/doc/API.md index d22ec4b..7fa5273 100644 --- a/doc/API.md +++ b/doc/API.md @@ -4,7 +4,7 @@ The CartoDB Data Services API offers a set of location based services that can b 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. +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 diff --git a/doc/general_concepts.md b/doc/general_concepts.md index 3a318fa..d6cc2ca 100644 --- a/doc/general_concepts.md +++ b/doc/general_concepts.md @@ -1,8 +1,8 @@ # General concepts -The Data Services API offers geocoding and routing 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 it will return the corresponding geometry (a `polygon` or a `point`) according to the input information. +The Data Services API offers geocoding and routing 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 routing services from the CartoDB Editor. The API allows to geocode data (being single rows, complete datasets or simple inputs) and to perform trade areas analysis (computing isodistances or isochrones) programatically through authenticated requests. +The Data Services API decouples the geocoding and routing 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/). diff --git a/doc/quickstart.md b/doc/quickstart.md index ccacabc..ec79bd8 100644 --- a/doc/quickstart.md +++ b/doc/quickstart.md @@ -1,6 +1,6 @@ # 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 Routing functions allow to calculate the area which can be reached by travelling a given distance or time, useful for geospatial analysis such as Trade Area Analysis. +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 routing 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: @@ -13,13 +13,13 @@ In order to geocode an existent CartoDB dataset, an SQL UPDATE statement must be ```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} ``` -You can use the routing 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 of the location by following a path defined by car routing. +You can use the routing functions to retrieve. For example, retrieve 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} ``` -Notice that you can make use of Postgres or PostGIS functions in your Data Services API requests, as the result of it will be a geometry that can be handled by the system. As an example, if 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: +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} diff --git a/doc/routing_functions.md b/doc/routing_functions.md index 91b91bc..74c074f 100644 --- a/doc/routing_functions.md +++ b/doc/routing_functions.md @@ -15,8 +15,8 @@ Name | Type | Description | Accepted values --- | --- | --- | --- `source` | `geometry` | Source point, in 4326 projection, which defines the start location. | `mode` | `geometry` | Type of transport used to calculate the isolines. | `car` or `walk` -`range` | `integer[]` | Range of the isoline in meters. | -`options` | `text[]` | Optional. Multiple options to add more capabilities to the analysis. See the **Optional isolines parameters** section below for details. +`range` | `integer[]` | Range of the isoline, in meters. | +`options` | `text[]` | Optional. Multiple options to add more capabilities to the analysis. See [Optional isolines parameters](#optional-isoline-parameters) for details. #### Returns @@ -50,14 +50,14 @@ SELECT the_geom FROM cdb_isodistance('POINT(-3.70568 40.42028)'::geometry, 'walk #### Arguments -This function uses the same parameters and information as the `cdb_isodistance` function with the difference that the range is measured in seconds instead of meters. +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. Name | Type | Description | Accepted values --- | --- | --- | --- `source` | `geometry` | Source point, in 4326 projection, which defines the start location. | `mode` | `geometry` | Type of transport used to calculate the isolines. | `car` or `walk` -`range` | `integer[]` | Range of the isoline in seconds. | -`options` | `text[]` | Optional. Multiple options to add more capabilities to the analysis. See the **Optional isolines parameters** section below for details. +`range` | `integer[]` | Range of the isoline, in seconds. | +`options` | `text[]` | Optional. Multiple options to add more capabilities to the analysis. See [Optional isolines parameters](#optional-isoline-parameters) for details. #### Examples @@ -79,7 +79,7 @@ SELECT the_geom FROM cdb_isochrone('POINT(-3.70568 40.42028)'::geometry, 'walk', ### Optional isoline parameters -The optional value parameters must be passed with the format: `option=value`. +The optional value parameters must be passed using the format: `option=value`. Name | Type | Description | Accepted values --- | --- | --- | --- @@ -87,6 +87,6 @@ Name | Type | Description | Accepted values `mode_type` | `text` | Type of route calculation | `shortest` or `fastest`. `shortest` by default `mode_traffic` | `text` | Use traffic data to calculate the route | `enabled` or `disabled`. `disabled` by default `singlecomponent` | `boolean` | If true, the isoline service will return a single polygon area, instead of creating a separate polygon for each reachable area separated of the main polygon (known as island). | `true` or `false`. `false` by default -`resolution` | `text` | Allows to specify level of detail needed for the isoline polygon. Unit is meters per pixel. Higher resolution may increase the response time of the service. -`maxpoints` | `text` | Allows to limit the amount of points in the returned isoline. If tge isoline consists of multiple components, the sum of points from all components is considered. Each component will have at least 2 points. It is possible that more points than specified could be returned in case when 2 * number of components` is higher than the `maxpoints` value itself. Increasing the number of `maxpoints` may increase the response time of the service. -`quality` | `text` | Allows to reduce the quality of the isoline in favor of the response time. | `1`, `2`, `3`. Default value is `1`, corresponding to the best quality option. +`resolution` | `text` | Allows you to specify the level of detail needed for the isoline polygon. Unit is meters per pixel. Higher resolution may increase the response time of the service. +`maxpoints` | `text` | Allows you to limit the amount of points in the returned isoline. If the isoline consists of multiple components, the sum of points from all components is considered. Each component will have at least two points. It is possible that more points than specified could be returned, in case when two * number of components` is higher than the `maxpoints` value itself. Increasing the number of `maxpoints` may increase the response time of the service. +`quality` | `text` | Allows you to reduce the quality of the isoline in favor of the response time. | `1`, `2`, `3`. Default value is `1`, corresponding to the best quality option.