Page 1 of 1
Preferred types of roads in vehicle profile
Posted: Mon Jun 13, 2016 2:27 pm
by VPlachy
Hello,
can you please advise on where to set preferred types of roads in vehicles profile for calculating a route ( xRoute.calculateExtendedRoute).
Thank you,
VladimĂr
Re: Preferred types of roads in vehicle profile
Posted: Mon Jun 13, 2016 2:53 pm
by Bernd Welter
Hello Vladimir,
please check this section describing the profiles:
http://xserver.ptvgroup.com/fileadmin/f ... g%7C_____0
Here is a minimalistic snippet
It's not using highways (NC_0 and NC_1 are set to 2501) and doesn't matter to use NC_2..NC_7)
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<Profile>
<Common coordinateFormat="OG_GEODECIMAL" language="en" majorVersion="1" minorVersion="0"/>
<Routing majorVersion="2" minorVersion="0">
<Course>
<BasicDataRules>
<Network rampMalus="10">
<MalusByNetworkClass malus="2501"/>
<MalusByNetworkClass malus="2501"/>
<MalusByNetworkClass malus="0"/>
<MalusByNetworkClass malus="0"/>
<MalusByNetworkClass malus="0"/>
<MalusByNetworkClass malus="0"/>
<MalusByNetworkClass malus="0"/>
<MalusByNetworkClass malus="0"/>
</Network>
</BasicDataRules>
</Course>
</Routing>
</Profile>
Attention:
Blocking "toll roads" isn't based on Network Class - check this:
http://xserver.ptvgroup.com/fileadmin/f ... Rules_Toll
Furthermore Ferries, Piggyback and MountainPasses have their own settings..
Best regards Bernd
Re: Preferred types of roads in vehicle profile
Posted: Mon Jun 13, 2016 3:07 pm
by Joost
Side note: in the next version of map and guide internet you can directly export your vehicle to a usable XML profile for xRoute.
Re: Preferred types of roads in vehicle profile
Posted: Tue Jun 14, 2016 2:10 pm
by VPlachy
Motorways is NC_0 and Fast Route is NC_1? And what about those other values NC_x?
Re: Preferred types of roads in vehicle profile
Posted: Tue Jun 14, 2016 9:18 pm
by Bernd Welter
Hello Vlad,
I have limited access at the moment.
Check the data type NetworkClass in the standard API doc. The enum starts with highways and ends up somewhere at "pedestrians and cycle lanes".
Best regards
Bernd