Snap to road feature

2499
4
09-21-2017 12:39 AM
MohammedSajid
New Contributor

Is there any option to adjust coordinates received from gps tracker to align along with the road? Google is having a feature called SnapToRoad, is there something like this in esri?

4 Replies
ThomasSolow
Occasional Contributor III

There's no high level tool to do this, but you can use the geometry engine to work something out.

If a road in this case is a polyline, you can find the distance between the road and the point, and if the distance is less than some number, move the point onto the polyline.  Here's a simple example showing this: JS Bin - Collaborative JavaScript Debugging (mouse over the view around the line to see the snapping effect)

A few things to note: I recommend doing all of this in the web mercator spatial reference.  Whichever spatial reference you use needs to match, that is the polyline's sr must match the point's sr.  In the example, I set the "snap distance" to 10 pixels.  If you want to snap based on world-meter-distance, you could take out the pixel logic and use meters instead.

0 Kudos
nicogis
MVP Frequent Contributor
0 Kudos
by Anonymous User
Not applicable

Hi@MohammedSajid ,

At ArcGIS Pro 3.0 there is a new GeoAnalytics Desktop tool called Snap Tracks. To access this tool you'll need ArcGIS Pro 3.0 and an advanced license.

Here are some resources to get started with the tool:

If you have any questions, or have any feedback on how the tool work for you, please reach out to geoanalytics-pes@esri.com

0 Kudos
JesseCloutier
Esri Community Manager

For records, the post left on 06-27-2022 01:23 PM belongs to @BethanyScott.

Jesse Cloutier
Community Manager, Engagement & Content
0 Kudos