[GraphHopper] speed limit

Peter K peathal at yahoo.de
Mon May 19 12:12:44 UTC 2014


Hey Philipp,

yes, sure. You can collect this while import e.g. via your own
CarFlagEncoder and store the maxspeed via an additional EncodedValue
(like we already do for the speed itself), and then add a separate
getMaxSpeed method to the encoder to read this information.

Regards,
Peter.


> Hi Peter,
>
> can I get the data myself? I import the OSM file so imho the speed limit should be stored on the file.
> So it should be nice to get the speed limit from the OSM data
>
> Phil
>
> Am 19.05.2014 um 08:14 schrieb Peter K <peathal at yahoo.de>:
>
>> Hey Philipp,
>>
>> the speed limit is currently not stored. We store the speed which is
>> either a guessed value or 0.9*maxspeed (for car). (When we make
>> available more properties, maxspeed will be part of this.)
>>
>> Regards,
>> Peter.
>>
>>> Hello,
>>>
>>> How can I get the speed limit of an edge?
>>>
>>> I use at the moment
>>>
>>>    public double getEdgeSpeed(int p_edge) {
>>>        return this.getGraph().getEncodingManager().getEncoder("CAR").getSpeed(p_edge);
>>>    }
>>>
>>> but it seems this returns incorrect values (the values are lower than existing data).
>>> I would like to get the current speed limit in km/h from an EdgeIteratorState or from an EdgeID.
>>>
>>> Thanks
>>>
>>> Philipp
>>>




More information about the GraphHopper mailing list