Select to view content in your preferred language

Plotting points on maps in arcgis qt and getting transect length

658
2
Jump to solution
07-11-2021 10:42 PM
SupratimChatterjee
Emerging Contributor

I am building an application similar to the geodesic operations sample present in Geodesic operations | ArcGIS Runtime API for Qt | ArcGIS for Developers . 

The example has a fixed source point and a dynamic destination point. I would like to implement this with multiple points(more than 2) in which the source point is dynamic as well.

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

The source and destination can be dynamic, but you will need to rerun the calculation. One thing to note is that geometries are immutable value objects in the API, so they are cheap and efficient, but will not get updated automatically. For example, you could set up a timer or have some notification system in your app that emits a signal when to re-run the analysis, and each time, the GeometryEngine::distanceGeodetic static function will be executed https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-geometryengine.html#distanceGe... 

View solution in original post

2 Replies
LucasDanzinger
Esri Frequent Contributor

The source and destination can be dynamic, but you will need to rerun the calculation. One thing to note is that geometries are immutable value objects in the API, so they are cheap and efficient, but will not get updated automatically. For example, you could set up a timer or have some notification system in your app that emits a signal when to re-run the analysis, and each time, the GeometryEngine::distanceGeodetic static function will be executed https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-geometryengine.html#distanceGe... 

SupratimChatterjee
Emerging Contributor

Ya, turns out that I just had to declare the polyline outside the connect signal in my code.

0 Kudos