Routing Parameter: OutputLine

3870
1
Jump to solution
03-31-2015 11:50 PM
LinaYap1
New Contributor II

I am using ArcGIS Runtime for .NET 10.2.4, and doing LocalRouteTask with a .geodatabase file.

Geodatabase file, cost attribute is Length (Meters)

I was testing the behaviour for RouteParameters.OutputLine which seems a little different from expectation based on the documentation

Basic Config:

RouteParameters routeParam = await routeTask.GetDefaultParametersAsync();

routeParam.OutSpatialReference = MapView.SpatialReference;

routeParam.ReturnRoute = true;

routeParam.ReturnDirections = true;

routeParam.DirectionLengthUnits = LinearUnits.Kilometers;

routeParam.DirectionLanguage = new CultureInfo("en-US");

routeParam.SetStops(stops);

routeParam.ReturnStops = true;

routeParam.ImpedanceAttributeName = "Length";

Varying Setting:

routeParam.OutputLine = Default

Observation: RouteResult is always null.

routeParam.OutputLine = Straight

Observation: RouteResult returns a route, but returns empty Geometry (a Polyline with 0 parts)

routeParam.OutputLine = TrueShape

Observation:  RouteResult returns a route, with a Polyline geometry. Polyline geometry contains M values

routeParam.OutputLine = TrueShapeWithMeasure

Observation: RouteResult returns a route, with a Polyline geometry. Polyline geometry contains M values.

My confusion here is:

- Does OutputLine.Default not solve for routing?

- OutputLine.Straight was suppose to return straight lines between stops, but the observation shows an empty geometry

- OutputLine.TrueShape and TrueShapeWithMeasure shows the same result (both has M values), should that be the case?

Further testing:

routeParam.OutputLine = TrueShapeWithMeasure

routeParameter.OutputGeometryPrecision = 0 / 10 / 1000;

routeParameter.OutputGeometryPrecisionUnit = LinearUnits.Meters

The above configuration returns the same geometry result for different OutGeometryPrecision values. I was expecting higher precision values to lower the number of points/line segments in the returned Geometry. Should that be the case?

Thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
AsserSwelam1
Occasional Contributor

Hi Lina,

Thanks for letting us know, try to go ahead and use the latest version 10.2.5 all OutputLine parameters works as expected, except Default value that is an issue we aware of.

Update: I apologize for the misunderstanding I thought you was talking about Online Routing, I tried LocalRouting as you mentioned and I am seeing the same behavior you described even on 10.2.5. We will work on fixing this issues.

Thanks,

Asser

View solution in original post

0 Kudos
1 Reply
AsserSwelam1
Occasional Contributor

Hi Lina,

Thanks for letting us know, try to go ahead and use the latest version 10.2.5 all OutputLine parameters works as expected, except Default value that is an issue we aware of.

Update: I apologize for the misunderstanding I thought you was talking about Online Routing, I tried LocalRouting as you mentioned and I am seeing the same behavior you described even on 10.2.5. We will work on fixing this issues.

Thanks,

Asser

0 Kudos