gdistm
Get distances between mouse clicks on a map or cumulative distances along a path of mouse clicks on a map. Data points are entered by pressing a mouse button or any key on the keyboard except the following:
Carriage return Terminates data entry.
Backspace Deletes previous data point.
z Zooms in, centered on current cursor location.
x Zooms out, centered on current cursor location.
Syntax
distances = gdistm
distances = gdistm(N)
distances = gdistm('rh')
distances = gdistm(DistanceUnit)
PathDistance = gdistm('path')
distances = gdistm('color',ColorSpec)
[distances,lat,lon] = gdistm(...)
Description
distances = gdistm gathers an unlimited number of points until the return key is pressed. Distances between points are returned in meters by default.
distances = gdistm(N) gets N points from the current map axes and returns a vector containing the great circle distance from point to point. The cursor can be positioned using a mouse.
distances = gdistm('rh') specifies a rhumb line track. If 'rh' is not specified, a great circle track is assumed.
distances = gdistm(DistanceUnit) specifies a unit of length measurement. Can be any unit described in the documentation for validateLengthUnit.
PathDistance = gdistm('path') specifies that a cumulative path distance along several point clicks is returned. If the 'path' option is chosen, length of distances array is N and distances(1) = 0. Matlabmatically, PathDistance = [0;cumsum(distances)];
distances = gdistm('color',ColorSpec) specifies a marker and line color.
[...,lat,lon] = gdistm(...) returns arrays of clicked latitudes and longitudes equivalent to [lat,lon] = inputm(...).
Citation pour cette source
Chad Greene (2025). gdistm (https://www.mathworks.com/matlabcentral/fileexchange/48517-gdistm), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
- Mathematics and Optimization > Mapping Toolbox > Data Analysis >
- Radar > Mapping Toolbox > Data Analysis >
- Mathematics and Optimization > Mapping Toolbox > Geometric Geodesy >
- Radar > Mapping Toolbox > Geometric Geodesy >
- MATLAB > Data Import and Analysis > Data Exploration >
Tags
Remerciements
Inspiré par : ginput2.m v3.1 (Nov 2009), Automatic Map Scale Generation, Custom GINPUT, scalebar for maps, pathdist, circlem, gdist
A inspiré : clickz
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
gdistm/
gdistm/html/
Version | Publié le | Notes de version | |
---|---|---|---|
1.1.0.0 | Now allows zooming. |
||
1.0.0.0 |