Address lookup, otherwise known as reverse geocoding, is used for finding places/addresses for given coordinates. The features property of the results returned is where you will find the list of results that matched the best with your input parameters.
http://api.opentransport.ro/geocoding/v1/reverse
Parameter | Type | Description |
---|---|---|
point.lat |
floating point number | Latitude value |
point.lon |
floating point number | Longitude value |
boundary.circle.radius |
floating point number | Searches only within the given radius from the location |
lang |
string | Returns results in the preferred language if such a language-bound name version is available (value can be ro or en ) |
size |
integer | Limits the number of results returned |
layers |
comma-delimited string array | Filters results by layer (see list of possible values here, commonly used values are address , venue and street ) |
sources |
comma-delimited string array | Filters results by source (value can be oa (OpenAddresses), osm (OpenStreetMap)) |
Note: parameter boundary.country
is not used by OpenTransport, as only data from Timisoara is available.
Name | Type | Description |
---|---|---|
id |
string | |
gid |
string | Global id that consists of a layer (such as address or country), an identifier for the original data source (such as openstreetmap or openaddresses), and an id for the individual record corresponding to the original source identifier, where possible. |
layer |
string | Place type (e.g. address ), see list of possible values here |
source |
string | Data source, for example openstreetmap , openaddresses or nlsfi |
source_id |
string | |
name |
string | A short description of the location, for example a business name, a locality name, or part of an address, depending on what is being searched for and what is returned. |
postalcode |
number | |
postalcode_gid |
string | |
confidence |
number | An estimation (as a percentage) of how accurately this result matches the query |
distance |
number | A distance from the query point (in kilometers) |
accuracy |
string | |
country |
string | Places that issue passports, nations, nation-states |
country_gid |
string | |
country_a |
string | ISO 3166-1 alpha-3 country code, for example ROU |
region |
string | For example Uusimaa |
region_gid |
string | |
localadmin |
string | Local administrative boundaries, for example Timisoara |
localadmin_gid |
string | |
locality |
string | Towns, hamlets, cities, for example Timisoara |
locality_gid |
string | |
neighbourhood |
string | Social communities, neighbourhoods, for example Iosefin |
neighbourhood_gid |
string | |
label |
string | A human-friendly representation of the place with the most complete details, that is ready to be displayed to an end user, for example East-West Pub, Itä-Pasila, Timisoara |
bbox |
string | If present, it describes the geographic extent of the feature, such as the screen size necessary to show all of California without needing to send the precise polygon geometry. |
http://api.opentransport.ro/geocoding/v1/reverse?point.lat=60.199284&point.lon=24.940540&size=1
Note: Using parameter size=1 limits the number of results returned to one.
https://api.opentransport.ro/geocoding/v1/reverse?point.lat=45.3551838&point.lon=25.54163
Note: This will return 10 places by default as the default value of the size parameter is 10 (the maximum value is 40). Specifying a value greater than 40 will override to 40 and return a warning in the response metadata.
Note: Using parameter layers=venue returns results for points of interest, businesses, things with walls.
Note: Using parameter layers=address returns results for places with a street address.
https://api.opentransport.ro/geocoding/v1/reverse?point.lat=45.3551838&point.lon=25.54163&lang=ro
Note: Using parameter lang=ro returns results in Romanian if such a language-bound name version is available.
Part of the provided geocoding data does not include Romanian names, and part of the data does not specify the language at all Address lookup always searches across all documents and returns found items in the preferred language if such a language-bound name version is available, otherwise using the default name, which in reality can represent any language. Most default names are of course in Romanian.
Press run to display a map with a marker.
Click the marker to see the address in its location.