I’ve successfully installed and sent a gpx file
to graphhopper and I got the following json
result:
{"hints":{},"info":{"copyrights":["GraphHopper","OpenStreetMap contributors"],"took":0},"paths":[{"distance":5339.005,"weight":9.223372036854775E12,"time":450291,"transfers":0,"points_encoded":true,"bbox":[-46.638765,-23.559783,-46.614062,-23.538809],"points":"pltnCfat{Gh@`AbPmKXY`@OxBUDG@GESaCo@mDgA`EcDDDf@j@JPmAfDmDgA`EcDDDf@j@JPbBjAf@Vp@VX]P]@IAQKQk@[}EyBg@IgB{@w@aAwA{CG_@iAuLfMb@L{ALoGh@PXRnAVjAJj@Jt@`@`BjAn@\\ZH~@D|@Gf@OfHkElA}@h@c@~@m@bA]h@GbCAfB@VAz@QhAc@ZIhAm@vBcAv@YTQV[r@kAl@gA|I}Hr@u@lA{An@cApA_Ch@oAl@cBfC_LpFyV^oAf@qA|@iB|@qA~@cA","instructions":[{"distance":40.863,"heading":235.0,"sign":0,"interval":[0,1],"text":"Continue onto Rua Aurora","time":2942,"street_name":"Rua Aurora"},{"distance":474.111,"sign":-2,"interval":[1,5],"text":"Turn left onto Rua Santa Ifigênia","time":56887,"street_name":"Rua Santa Ifigênia"},{"distance":20.083,"sign":-7,"interval":[5,8],"text":"Keep left","time":1806,"street_name":""},{"distance":180.298,"sign":-2,"interval":[8,10],"text":"Turn left onto Rua Brigadeiro Tobias","time":18542,"street_name":"Rua Brigadeiro Tobias"},{"distance":136.112,"sign":3,"interval":[10,11],"text":"Turn sharp right onto Rua Riskallah Jorge","time":13998,"street_name":"Rua Riskallah Jorge"},{"distance":4.096,"sign":2,"interval":[11,12],"text":"Turn right onto Avenida Prestes Maia","time":327,"street_name":"Avenida Prestes Maia"},{"distance":43.368,"sign":7,"interval":[12,14],"text":"Keep right onto Avenida Prestes Maia","time":2401,"street_name":"Avenida Prestes Maia"},{"distance":96.057,"sign":2,"interval":[14,15],"text":"Turn right onto Praça Pedro Lessa","time":11525,"street_name":"Praça Pedro Lessa"},{"distance":104.176,"sign":2,"interval":[15,16],"text":"Turn right onto Rua Brigadeiro Tobias","time":10713,"street_name":"Rua Brigadeiro Tobias"},{"distance":136.112,"sign":3,"interval":[16,17],"text":"Turn sharp right onto Rua Riskallah Jorge","time":13998,"street_name":"Rua Riskallah Jorge"},{"distance":4.096,"sign":2,"interval":[17,18],"text":"Turn right onto Avenida Prestes Maia","time":327,"street_name":"Avenida Prestes Maia"},{"distance":166.338,"sign":7,"interval":[18,23],"text":"Keep right onto Avenida Prestes Maia","time":9209,"street_name":"Avenida Prestes Maia"},{"distance":319.745,"sign":-2,"interval":[23,32],"text":"Turn left","time":19306,"street_name":""},{"distance":383.564,"sign":7,"interval":[32,36],"text":"Keep right onto Avenida Prestes Maia","time":43337,"street_name":"Avenida Prestes Maia"},{"distance":254.259,"sign":3,"interval":[36,37],"text":"Turn sharp right onto Rua Barão de Duprat","time":30506,"street_name":"Rua Barão de Duprat"},{"distance":186.557,"sign":-2,"interval":[37,39],"text":"Turn left onto Rua Comendador Assad Abdalla","time":22384,"street_name":"Rua Comendador Assad Abdalla"},{"distance":677.215,"sign":3,"interval":[39,54],"text":"Turn sharp right onto Avenida do Estado, BR-050","time":34823,"street_name":"Avenida do Estado, BR-050"},{"distance":180.335,"sign":7,"interval":[54,58],"text":"Keep right","time":9986,"street_name":""},{"distance":323.713,"sign":-7,"interval":[58,66],"text":"Keep left","time":18657,"street_name":""},{"distance":83.13,"sign":-7,"interval":[66,69],"text":"Keep left","time":6650,"street_name":""},{"distance":1524.777,"sign":7,"interval":[69,84],"text":"Keep right","time":121967,"street_name":""},{"distance":0.0,"sign":4,"last_heading":137.57862576681327,"interval":[84,84],"text":"Arrive at destination","time":0,"street_name":""}],"legs":[],"details":{},"ascend":0.0,"descend":0.0,"snapped_waypoints":""}],"map_matching":{"original_distance":5416.372399303108,"distance":5339.0048843159975,"time":450291}}
I’ve used the following curl command to get this result:
curl -XPOST -H "Content-Type: application/gpx+xml" -d @myfile.gpx "localhost:8989/match?vehicle=car&type=json"
I’d like to know if I can tweak this json output to different formats. For me, it’d be useful if it could return a sequence of gps points that match the lines of dots from the original file. Is there any configuration I can change to accomplish that? If not, where in the code I should be looking in order to make the necessary changes and make it work for me?