Page 1 of 1

Linking to waypoint (zero-based index list) failed

Posted: Fri Nov 17, 2017 11:33 am
by Rok
Hello,

I am trying to calculate route cost, based on a previous route that a truck had driven. I have the coordinates that the truck went through on its route and i pass them as waypoints to the calculateExtendedRoute operation. I keep getting the "linking to waypoint (zero-based index list) failed" exception and i don't know how to get around it. If i insert the route with exactly the same coordinates into the PTV Map&Guide internet trial, it calculates the route without a problem. However, it returns the aforementioned exception when i send a request from my server.

I have tried several different options to avoid the exception, changing the linkType/viaType of the waypoints, allowing segment violations, i tried implementing the trick mentioned here: Routing: Enter authorized passages with delivery vehicles (DevBlog, 10.1.2014, thanks Michael!), tried increasing the maximumDistanceToSegment property, all with no success.

Here is a stripped down version of my request, with only the waypoints that cause the linking error, hopefully you can point me in the right direction of what i need to change in my request, so that the exception will be gone. The exception I get reads: "linking to waypoint (zero-based index list: 4) failed".

Code: Select all

<?xml version="1.0" encoding="utf-16"?>
<calculateExtendedRouteRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<ArrayOfWaypointDesc_1>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="23.144502639770508" y="52.038711547851563" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="23.561130523681641" y="52.110450744628906" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="23.57036018371582" y="52.120311737060547" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="23.575920104980469" y="52.122821807861328" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="23.659549713134766" y="52.143318176269531" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="23.886789321899414" y="52.122520446777344" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="26.599710464477539" y="53.450908660888672" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
		<WaypointDesc fuzzyRadius="0" linkType="NEXT_NODE" xmlns="http://xroute.xserver.ptvag.com">
			<wrappedCoords>
				<Point xmlns="http://common.xserver.ptvag.com">
					<kml xsi:nil="true" />
					<point x="24.358179092407227" y="52.214111328125" />
				</Point>
			</wrappedCoords>
			<nodeID xsi:nil="true" />
			<wrappedRoutingOptions xsi:nil="true" />
			<wrappedSegmentID xsi:nil="true" />
			<wrappedVehicleOptions xsi:nil="true" />
			<viaType xsi:nil="true" />
		</WaypointDesc>
	</ArrayOfWaypointDesc_1>
	<ArrayOfRoutingOption_2>
		<RoutingOption parameter="COUNTRY_ENCODING" value="ISO2" xmlns="http://xroute.xserver.ptvag.com" />
		<RoutingOption parameter="GENERATE_EXTWAYPOINTS" value="true" xmlns="http://xroute.xserver.ptvag.com" />
		<RoutingOption parameter="ALLOW_SEGMENT_VIOLATIONS" value="true" xmlns="http://xroute.xserver.ptvag.com" />
		<RoutingOption parameter="COST_OF_SEGMENT_VIOLATIONS" value="50000" xmlns="http://xroute.xserver.ptvag.com" />
	</ArrayOfRoutingOption_2>
	<ArrayOfExceptionPath_3 xsi:nil="true" />
	<ResultListOptions_4 totalRectangle="false" tollManoeuvres="false" texts="false" segments="true" segmentAttributes="false" polygon="true" nodes="false" manoeuvreGroups="false" urbanManoeuvres="false" manoeuvreAttributes="false" dynamicInfo="false" detailLevel="BORDERS" brunnelManoeuvres="false" boundingRectanglesOffset="0" boundingRectanglesC="0" binaryPathDesc="true" manoeuvres="false">
		<cenEmissionConfiguration xsi:nil="true" xmlns="http://xroute.xserver.ptvag.com" />
		<destDetail xsi:nil="true" xmlns="http://xroute.xserver.ptvag.com" />
		<emissions xsi:nil="true" xmlns="http://xroute.xserver.ptvag.com" />
		<hbefaType xsi:nil="true" xmlns="http://xroute.xserver.ptvag.com" />
		<startDetail xsi:nil="true" xmlns="http://xroute.xserver.ptvag.com" />
	</ResultListOptions_4>
	<CountryInfoOptions_5 xmlns:q1="http://xroute.xserver.ptvag.com" xsi:type="q1:CountryInfoVehicleOptions" allEuro="true" calculatePartTollCosts="true" detailedTollCosts="true">
		<q1:wrappedReductionIDs xsi:nil="true" />
		<q1:wrappedTollScenarios xsi:nil="true" />
		<q1:wrappedOptions>
			<q1:VehicleOption parameter="TYPE" value="TRL" />
			<q1:VehicleOption parameter="TOTAL_WEIGHT" value="40000" />
			<q1:VehicleOption parameter="NUMBER_OF_AXLES" value="5" />
			<q1:VehicleOption parameter="EMISSION_CLASS" value="EURO_5" />
		</q1:wrappedOptions>
	</CountryInfoOptions_5>
	<CallerContext_6>
		<wrappedProperties xmlns="http://baseservices.service.jabba.ptvag.com">
			<CallerContextProperty key="CoordFormat" value="OG_GEODECIMAL" />
		</wrappedProperties>
	</CallerContext_6>
</calculateExtendedRouteRequest>
Thank you in advance for your help.

Best regards,
Rok

Re: Linking to waypoint (zero-based index list) failed

Posted: Mon Nov 20, 2017 8:55 am
by Joost
Map and guide uses Here map data. I'm making an educated guess that you are using TomTom map data. The coverage of Belarus in TomTom is much lower then Here. This is why Map and Guide can link to a road en your installation can't. I would suggest to discus the map choice with your technical contact directly.

Re: Linking to waypoint (zero-based index list) failed

Posted: Thu Nov 23, 2017 1:09 pm
by Bernd Welter
Just a side note:
If you have the coordinates because of the GPS trace you could also use xMapMatch service to ensure a proper track of the routing afterwards. Let us know whether this is the case. Maybe we can provide a sample calculation if you provide the GPS trace.

Re: Linking to waypoint (zero-based index list) failed

Posted: Fri Nov 24, 2017 9:46 am
by Rok
Thank you guys both for the replies.
I will get back to you if/when I have more questions.

Re: Linking to waypoint (zero-based index list) failed

Posted: Fri Mar 24, 2023 8:57 am
by Bernd Welter
Hi there,

looks like this topic is back on my desk - I've been asked by several players in the recent weeks about the same effect and the answer was the loink to the DevBlog article by Michael Nutto.

Please be aware that granting access each time is not what you probably want. I therefore recommend to apply an iterative approach:
  • Try to compute the route with restricted settings
  • If this fails apply weaker restrictions as mentioned in the Blog
With the given data you would probably reach the second level only in a rare number of cases.

Bernd