[GraphHopper] routing call with object pass into weight object

Peter graphhopper at gmx.de
Mon Mar 9 09:27:12 UTC 2015


Only 0.4


On 07.03.2015 21:58, Philipp Kraus wrote:
> Hi Peter,
>
> works this with GraphHopper 0.3 also, because I cannot migrate to a new version at the moment?
>
> Thx
>
> Regard
>
> Phil
>
>
> Am 07.03.2015 um 17:03 schrieb Peter <graphhopper at gmx.de>:
>
>> Hi Phil,
>>
>> yes, you can put it into the hints and it will be available in the
>> WeightingMap which you can then read and use in your custom weighting.
>> See the docs regarding custom weighting for how to do this.
>>
>> Regards,
>> Peter
>>
>> On 07.03.2015 12:58, Philipp Kraus wrote:
>>> Hello,
>>>
>>> I would like to pass a specified java object on the GHRequest call that is pushed into the calcWeight method of the Weighting class e.g.
>>>
>>> GHRequest l_request = new GHRequest( start_latitude, start_longitude, end_latitude, end_longitude, myObject );
>>>
>>> and the calcWeight should be also:
>>>
>>> public final double calcWeight( final EdgeIteratorState p_edge, final boolean p_reverse, final Object p_myobject )
>>>
>>> can I do this in any way?
>>>
>>> Phil
>>>




More information about the GraphHopper mailing list