Good afternoon!
We are loading polyline features into a ServiceFeatureTable using QueryFeaturesAsync, and noticed that although the QueryParameters class has a parameter for "ReturnGeometry", it does not have a parameter for "ReturnTrueCurves". I was wondering if ArcGIS Runtime SDK for .NET supports true curves in this scenario?
We are basically trying to roll our own real-time traffic solution since we are using our own custom road network. First, we want to load a set of traffic jam polylines from our feature service (some of these polylines will be true curves). Then, we create a new RouteTask against our Network Analyst service that uses our own road network, and we pass these polylines as CostAdjustment barriers to the SolveRouteAsync method.
This works great except for true curves... Our road network contains true curves in some places, and if we don't pass a true curve for these to the SolveRouteAsync, then it only minimally considers the impedance cost factor (just where the vertices of the polyline impedance come close to the vertices of the true curve road segment).
Perhaps there is a way to force Return True Curves = True when we publish our feature service - could that solve the problem?
Thank you!
Solved! Go to Solution.
Have you tried setting ArcGISRuntimeEnvironment.ServiceCurveGeometryMode ?
Have you tried setting ArcGISRuntimeEnvironment.ServiceCurveGeometryMode ?
Didn't even know that existed - I'll give that a try! Thank you!
That solve part of my problem! I set the following,
ArcGISRuntimeEnvironment.ServiceCurveGeometryMode = Esri.ArcGISRuntime.ArcGISServices.ServiceCurveGeometryMode.TrueCurveClient
making sure to do it early in the application startup code, and now as I inspect the HTTP requests being made from the WPF client app, they have the returnCurves = true parameter set correctly.
However, the JSON responses did not contain curvePath elements as I would expect. It turns out that my map service layers were based off of SQL views, but these views were not registered with the geodatabase. Once I registered them and republished the map service, the curvePaths came back correctly. And most importantly, I was finally able to use these true curves as polyline impedances in route calculations!
Thanks again for your help Preeti!