Update API.md

This commit is contained in:
Carla 2015-11-13 15:00:39 +01:00
parent 78ce076c81
commit f18feb4bc0

View File

@ -32,74 +32,74 @@ possible side-effects
This function receives a country name and returns a polygon geometry (SRID 4326) for the corresponding input. This function receives a country name and returns a polygon geometry (SRID 4326) for the corresponding input.
* Functions: * Functions:
* `geocode_admin0_polygons(countryname text)` * `geocode_admin0_polygon(countryname text)`
* **Return type:** `polygon` * **Return type:** `polygon`
* **Usage example:** * **Usage example:**
````` `````
SELECT geocode_admin0_polygons('France') SELECT geocode_admin0_polygon('France')
````` `````
### Level-1 Administrative regions geocoder ### Level-1 Administrative regions geocoder
* Functions: * Functions:
* `geocode_admin1_polygons(adminname text)` * `geocode_admin1_polygon(adminname text)`
* **Return type:** `polygon` * **Return type:** `polygon`
* **Usage example:** * **Usage example:**
````` `````
SELECT geocode_admin1_polygons('Alicante') SELECT geocode_admin1_polygon('Alicante')
````` `````
* `geocode_admin1_polygons(adminname text, countryname text)` * `geocode_admin1_polygon(adminname text, countryname text)`
* **Return type:** `polygon` * **Return type:** `polygon`
* **Usage example:** * **Usage example:**
````` `````
SELECT geocode_admin1_polygons('Alicante', 'Spain') SELECT geocode_admin1_polygon('Alicante', 'Spain')
````` `````
### Cities geocoder ### Cities geocoder
* Functions: * Functions:
* `geocode_namedplace(city text)` * `geocode_namedplace_point(city text)`
* **Return type:** `point` * **Return type:** `point`
* **Usage example:** * **Usage example:**
````` `````
SELECT geocode_namedplace('Barcelona') SELECT geocode_namedplace_point('Barcelona')
````` `````
* `geocode_namedplace(city text, country text)` * `geocode_namedplace_point(city text, country text)`
* **Return type:** `point` * **Return type:** `point`
* **Usage example:** * **Usage example:**
````` `````
SELECT geocode_namedplace('Barcelona', 'Spain') SELECT geocode_namedplace_point('Barcelona', 'Spain')
````` `````
* `geocode_namedplace(city text, admin1 text, country text)` * `geocode_namedplace_point(city text, admin1 text, country text)`
* **Return type:** `point` * **Return type:** `point`
* **Usage example:** * **Usage example:**
````` `````
SELECT geocode_namedplace('New York', 'New York', 'USA') SELECT geocode_namedplace_point('New York', 'New York', 'USA')
````` `````
### Postal codes geocoder ### Postal codes geocoder
* Functions: * Functions:
* `geocode_postalcode_polygons(code text, country text)` * `geocode_postalcode_polygon(code text, country text)`
* **Return type:** `polygon` * **Return type:** `polygon`
* **Usage example:** * **Usage example:**
````` `````
SELECT geocode_postalcode_polygons('11211', 'USA') SELECT geocode_postalcode_polygon('11211', 'USA')
````` `````
* `geocode_postalcode_points(code text, country text)` * `geocode_postalcode_point(code text, country text)`
* **Return type:** `point` * **Return type:** `point`
* **Usage example:** * **Usage example:**
````` `````
SELECT geocode_postalcode_points('11211', 'USA') SELECT geocode_postalcode_point('11211', 'USA')
````` `````
### IP addresses Geocoder ### IP addresses Geocoder
* Functions: * Functions:
* `geocode_ip(ipaddress text)` * `geocode_ip_point(ipaddress text)`
* **Return type:** `point` * **Return type:** `point`
* **Usage example:** * **Usage example:**
````` `````
SELECT geocode_ip('102.23.34.1') SELECT geocode_ip_point('102.23.34.1')
````` `````