Borrar filtros
Borrar filtros

Replace the wrong GPS Coordinate recorded

1 visualización (últimos 30 días)
charbel lahoud
charbel lahoud el 29 de Jun. de 2022
Respondida: Jaynik el 6 de Oct. de 2023
How to solve the inaccuracy of GPS coordinates? is there any way to replace gps coordinates to the nearest one located on a road?

Respuesta aceptada

Jaynik
Jaynik el 6 de Oct. de 2023
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!

Más respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by