Replace the wrong GPS Coordinate recorded
조회 수: 1 (최근 30일)
이전 댓글 표시
How to solve the inaccuracy of GPS coordinates? is there any way to replace gps coordinates to the nearest one located on a road?
댓글 수: 0
채택된 답변
Jaynik
2023년 10월 6일
Hi Charbel,
I understand that you want to replace the gps coordinates to the nearest one on a road. I assume that you have the road data in the form of coordinates. For a given latitude and longitude, you can obtain the nearest coordinates with the help of the "knnsearch" function from the "Statistics and Machine Learning Toolbox".
% roadPoints is the coordinates of roads & gpsCoordinate is the inaccurate GPS coordinate input
nearestIdx = knnsearch(roadPoints, gpsCoordinate);
matchedCoordinate = roadPoints(nearestIdx, :);
Refer the following link to learn more about "knnsearch":
Hope this helps!
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Hypothesis Tests에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!