REST API, Service version 1.0.0
Roads extractor#
Performs a Road-Matching (or Map-Matching) process for a specified type of vehicle within a specified polygon.
This method builds a list of ExtractedRoadFront on each road element within the specified polygon.
For road elements which are open in both directions according to the specified type of vehicle, two ExtractedRoadFront will be created, one for each direction.
The angle set on each ExtractedRoadFront defines the direction this point has to be reached should you use these points to perform a route calculation or trip optimization.
NOTE: The maximum number of
ExtractedRoadFrontthat can be created is limited to 1500.
Summary#
- Request
- Mandatory parameters
- Optional parameters
- Response
- Details of fields
- Response samples
Request#
The request must be sent with the HTTP method POST and the HTTP header Content-Type set to application/json.
Sample:
URI: /bgis/service/roadsextractor/1.0
POST data:
{
"geoserver": "default",
"outputLanguage": "en",
"coordinates": [
{
"lon": 7.41,
"lat": 43.73
},
{
"lon": 7.42,
"lat": 43.73
},
{
"lon": 7.42,
"lat": 43.74
},
{
"lon": 7.41,
"lat": 43.74
},
{
"lon": 7.41,
"lat": 43.73
}
],
"transportType": "CAR",
"adminPath": true
}All coordinates are defined by longitude and latitude, see the coordinate system glossary for more details.
Parameters#
coordinatesCoordinate[]requiredList of coordinates of the polygon.
geoserverstringGeoserver name.
swidxinteger (int32)deprecatedSwitch index.
outputLanguagestringDefine the language that will be used to perform the address lookup. Objects for which defined language code is not available, the default language will be used. A US-ASCII string that defines an ISO 639-1 (2-letter) language code. The special "IC" (or "ic") language code allows you to search for a country depending on its ISO-3166 Alpha-3 or Alpha-2 country code.
transportTypeenumTransportation mode.
CARby default.9 accepted values
PEDESTRIANPedestrian. BICYCLEBicycle. MOTORCYCLEMotorcycle. CARPassenger car. TAXITaxi. PUBLIC_BUSPublic bus. EMERGENCYEmergency vehicle. DELIVERY_TRUCKDelivery truck. Deprecated, use TRUCKinstead.TRUCKTruck. classIdFiltersstring[]List of road network class ID to filter by. A class ID can be a number e.g.
4000or an enumeration string e.g.ROAD_FOURTH). No filtering by default. List of available class ID.adminPathbooleanSet this flag to true if you want to retrieve the complete hierarchical path of each
ExtractedRoadFront. This option is required to get the postal addresses.filterElementsHouseNumbersbooleanSet to true to filter road elements with house numbers only.
filterClippedElementsbooleanSet this flag to true if you want to filter out elements which are not fully inside the polygon.
Response#
Details of fields#
roadsExtractedRoadFront[]List of extracted road information.
ExtractedRoadFront fields
coordinateCoordinateThe coordinate around the middle of the extracted road.
angleinteger (int32)Angle associated with the coordinate of the extracted road. This angle defines the direction this point has to be reached should you use these points to perform a route calculation or trip optimization.
labelstringLabel of the road.
postalAddressAddressPostal address of the extracted road.
Address fields
countryCodestringISO code of country.
countrystringCountry name.
statestringState name.
countystringCounty name.
citystringCity name.
districtstringDistrict name of city.
postalCodestringPostal code.
roadNumberstringRoad number.
streetstringStreet name.
streetNumberstringHouse number.
oppositeStreetNumberstringdeprecatedOpposite street number.
Response samples#
JSON Sample:
{
"roads": [
{
"coordinate": {
"lon": 7.411,
"lat": 43.731
},
"postalAddress": {
"street": "Avenue de la Costa",
"city": "Monaco",
"postalCode": "98000"
}
}
]
}