Skip to content

Commit 81b9ad1

Browse files
authored
Merge pull request #101 from IGNF/develop
Update to 2.2.5 (#99)
2 parents affb72c + a0c9483 commit 81b9ad1

File tree

17 files changed

+1485
-8
lines changed

17 files changed

+1485
-8
lines changed

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CHANGELOG
22

3+
## 2.2.5
4+
5+
FEAT:
6+
- The native OSRM API v1 was added but some parameters and error responses are still missing
7+
38
## 2.2.4
49
FIXED:
510
- The pg module can emit error event and they were not catched and so it caused some crashs of Road2

docker/config/service.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@
5858
{
5959
"name" : "simple",
6060
"version" : "1.0.0"
61+
},
62+
{
63+
"name" : "osrm",
64+
"version" : "1.0.0"
6165
}
6266
]
6367
}

docker/distributions/debian/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN apt-get update && \
2828
libsqlite3-mod-spatialite libzmq3-dev libczmq-dev
2929

3030
### Installation prime-server
31-
COPY --from=build /usr/local/lib/libprime_server.so.0.7.0 /usr/lib/libprime_server.so.0.0.0
31+
COPY --from=build /usr/local/lib/libprime_server.so.0.7.1 /usr/lib/libprime_server.so.0.0.0
3232
COPY --from=build /usr/local/lib/libprime_server.so.0 /usr/lib/libprime_server.so.0
3333
COPY --from=build /usr/local/lib/libprime_server.so /usr/lib/libprime_server.so
3434

Lines changed: 262 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
{
2+
"openapi": "3.0.0",
3+
"info": {
4+
"description": "Description of the OSRM API available via Road2. Only route operation in its v1 is available.",
5+
"version": "1.0.0",
6+
"title": "OSRM API inside Road2",
7+
"contact": {
8+
"email": "contact.geoservices@ign.fr"
9+
}
10+
},
11+
"servers": [
12+
{
13+
"url": "http://localhost:8080/osrm/1.0.0/",
14+
"description": "Local server"
15+
}
16+
],
17+
"tags": [
18+
{
19+
"name": "Discover",
20+
"description": "Discover the resources available on this instance."
21+
},
22+
{
23+
"name": "Route",
24+
"description": "Ask for one or multiple routes."
25+
}
26+
],
27+
"paths": {
28+
"/resources": {
29+
"get": {
30+
"tags": [
31+
"Discover"
32+
],
33+
"summary": "Request used to discover the resources available on this instance.",
34+
"description": "",
35+
"operationId": "resources",
36+
"responses": {
37+
"200": {
38+
"description": "successful operation",
39+
"content": {
40+
"application/json": {
41+
"schema": {
42+
"$ref": "#/components/schemas/resources"
43+
}
44+
}
45+
}
46+
},
47+
"404": {
48+
"description": "Not found"
49+
}
50+
}
51+
}
52+
},
53+
"/{resourceId}/{profileId}/{optimizationId}/route/v1/_/{coordinates}": {
54+
"get": {
55+
"tags": [
56+
"Route"
57+
],
58+
"summary": "Compute a route",
59+
"description": "This API route is the same of [the OSRM v1 route](http://project-osrm.org/docs/v5.5.1/api/#route-service). But the profile parameter is separated in three parameters : resourceId, profileId and optimizationId. It allows us to have the concepts of Road2 and a better compatibility with the native OSRM API.",
60+
"operationId": "route",
61+
"parameters": [
62+
{
63+
"name": "resourceId",
64+
"in": "path",
65+
"description": "The resource used for the compute. The list of resources is available on /resources. A resource is a concept of Road2, it is an agregation of multiple graphs. For instance, an unique topology with multiple costs.",
66+
"required": true,
67+
"schema": {
68+
"type": "string"
69+
},
70+
"example": "bdtopo-osrm"
71+
},
72+
{
73+
"name": "coordinates",
74+
"in": "path",
75+
"description": "String of format {longitude},{latitude};{longitude},{latitude}[;{longitude},{latitude} ...] or polyline({polyline}).",
76+
"required": true,
77+
"schema": {
78+
"type": "string"
79+
},
80+
"example": "2.337306,48.849319"
81+
},
82+
{
83+
"name": "profileId",
84+
"in": "path",
85+
"description": "The profile used for the compute. The list of profiles per resource is available on /resources.",
86+
"required": true,
87+
"schema": {
88+
"type": "string"
89+
},
90+
"example": "car"
91+
},
92+
{
93+
"name": "optimizationId",
94+
"in": "path",
95+
"description": "The optimization used for the compute. The list of optimizations per resource is available on /resources.",
96+
"required": true,
97+
"schema": {
98+
"type": "string"
99+
},
100+
"example": "fastest"
101+
},
102+
{
103+
"name": "alternatives",
104+
"in": "query",
105+
"description": "Search for alternative routes and return as well. Please note that even if an alternative route is requested, a result cannot be guaranteed.",
106+
"required": false,
107+
"schema": {
108+
"type": "string"
109+
},
110+
"example": "false"
111+
},
112+
{
113+
"name": "steps",
114+
"in": "query",
115+
"description": "Return route steps for each route leg.",
116+
"required": false,
117+
"schema": {
118+
"type": "string"
119+
},
120+
"example": "false"
121+
},
122+
{
123+
"name": "annotations",
124+
"in": "query",
125+
"description": "Returns additional metadata for each coordinate along the route geometry.",
126+
"required": false,
127+
"schema": {
128+
"type": "string"
129+
},
130+
"example": "false"
131+
},
132+
{
133+
"name": "geometries",
134+
"in": "query",
135+
"description": "Returned route geometry format (influences overview and per step). Values can be : polyline (default), polyline6 , geojson.",
136+
"required": false,
137+
"schema": {
138+
"type": "string"
139+
},
140+
"example": "polyline"
141+
},
142+
{
143+
"name": "overview",
144+
"in": "query",
145+
"description": "Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all. Values can be : simplified (default), full , false.",
146+
"required": false,
147+
"schema": {
148+
"type": "string"
149+
},
150+
"example": "simplified"
151+
},
152+
{
153+
"name": "continue_straight",
154+
"in": "query",
155+
"description": "Forces the route to keep going straight at waypoints constraining uturns there even if it would be faster. Default value depends on the profile. Values can be : default (default), true , false. ",
156+
"required": false,
157+
"schema": {
158+
"type": "string"
159+
},
160+
"example": "default"
161+
}
162+
],
163+
"responses": {
164+
"200": {
165+
"description": "Successful operation. For all the details, see [the OSRM documentation](http://project-osrm.org/docs/v5.5.1/api/#route-service).",
166+
"content": {
167+
"application/json": {
168+
"schema": {
169+
"$ref": "#/components/schemas/osrmValidResponse"
170+
}
171+
}
172+
}
173+
},
174+
"400": {
175+
"description": "Error. For all the details, see [the OSRM documentation](http://project-osrm.org/docs/v5.5.1/api/#route-service).",
176+
"content": {
177+
"application/json": {
178+
"schema": {
179+
"$ref": "#/components/schemas/osrmErrorResponse"
180+
}
181+
}
182+
}
183+
}
184+
}
185+
}
186+
}
187+
},
188+
"components": {
189+
"schemas": {
190+
"osrmErrorResponse": {
191+
"type": "object",
192+
"properties": {
193+
"code": {
194+
"type": "string"
195+
},
196+
"message": {
197+
"type": "string"
198+
}
199+
}
200+
},
201+
"osrmValidResponse": {
202+
"type": "object",
203+
"properties": {
204+
"code": {
205+
"type": "string",
206+
"description" : "if the request was successful Ok otherwise see the service dependent and general status codes on the [the OSRM documentation](http://project-osrm.org/docs/v5.5.1/api/#route-service)."
207+
},
208+
"routes": {
209+
"type": "array",
210+
"items": {
211+
"type": "object",
212+
"description": "For all the details, see the OSRM documentation of a [route object](http://project-osrm.org/docs/v5.5.1/api/#route-object)."
213+
}
214+
},
215+
"waypoints": {
216+
"type": "array",
217+
"items": {
218+
"type": "object",
219+
"description": "For all the details, see the OSRM documentation of a [waypoint object](http://project-osrm.org/docs/v5.5.1/api/#waypoint-object)."
220+
}
221+
}
222+
}
223+
},
224+
"resources": {
225+
"type": "array",
226+
"items": {
227+
"type": "object",
228+
"properties": {
229+
"id": {
230+
"type": "string"
231+
},
232+
"description": {
233+
"type": "string"
234+
},
235+
"profiles": {
236+
"type": "array",
237+
"items": {
238+
"type": "object",
239+
"properties": {
240+
"id": {
241+
"type": "string"
242+
},
243+
"optimizations": {
244+
"type": "array",
245+
"items": {
246+
"type": "object",
247+
"properties": {
248+
"id": {
249+
"type": "string"
250+
}
251+
}
252+
}
253+
}
254+
}
255+
}
256+
}
257+
}
258+
}
259+
}
260+
}
261+
}
262+
}

0 commit comments

Comments
 (0)