Calculate distance considering road network
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I would like to calculate the distance between two coordinates using Matlab. However, this distance I would like to consider the road network. I wouldn't want to use any google API ok. The latitude and longitude of the two points are below:
% Coordinates of the points:
lat1 = -22.8851078223344;
lon1 = -48.4939312250395;
lat2 = -22.8315940282463;
lon2 = -48.4298167144681;
0 comentarios
Respuestas (1)
Chunru
el 2 de Mayo de 2023
lat1 = -22.8851078223344;
lon1 = -48.4939312250395;
lat2 = -22.8315940282463;
lon2 = -48.4298167144681;
% need mapping toolbox
arclen = distance(lat1, lon1, lat2, lon2)
d = deg2km(arclen)
2 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!