How to convert latitude and longitude of location to cartesian coordinates (x, y)?
50 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
ANURAG DEEPAK
am 15 Aug. 2022
Kommentiert: Chunru
am 16 Aug. 2022
Dear Sir,
Is there a feasible way of converting (lat, long) coordinates into cartesian corordinates (x, y) of respective locations?
For instance, i want to convert (27.2046° N, 77.4977° E) coordinates into (x, y).
0 Kommentare
Akzeptierte Antwort
Chunru
am 15 Aug. 2022
First, you need a reference point. Second you have to assume that the posints are close enough to the reference points so that the spherical coordinates on earth surface (lat, lon) can be approximate in cartesian coordinates.
With these assumption, you can do the following:
ref = [27, 77]; % ref point [lat, lon]
p = [27.2046, 77.4977];
[arclen az] = distance(ref, p)
x = deg2km(arclen.*cosd(az));
y = deg2km(arclen.*sind(az));
[x, y]
2 Kommentare
Chunru
am 16 Aug. 2022
"doc distance" for more details.
You can use the center of of data points as the reference point.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Map Display finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!