GeodesicDistanceMeters
頁面屬性、測量與地理空間
描述
傳回兩組 WGS 84 經緯度之間的地面距離(公尺)
語法
Delphi
Function TPDFlib.GeodesicDistanceMeters(Latitude1, Longitude1, Latitude2, Longitude2: Double): Double;
DLL
int DLGeodesicDistanceMeters(int InstanceID, double Latitude1, double Longitude1, double Latitude2, double Longitude2, PDouble Distance);
此匯出函式可於 Windows DLL、macOS Dylib 與 Linux 共享程式庫使用
ActiveX
Function PDFlib::GeodesicDistanceMeters(Latitude1 As Double, Longitude1 As Double, Latitude2 As Double, Longitude2 As Double) As Double
可用於 IPDFlibrary21。使用產生的型別程式庫單元的 Delphi 用戶端,可以下列方式取得 CoPDFlibrary.CreateEditionTools21
Automation 直接傳回距離。零代表兩點重合或座標無效
參數
| Latitude1, Latitude2 | 緯度(度),−90 到 90 |
|---|---|
| Longitude1, Longitude2 | 經度(度),−180 到 180 |
| Distance | 由 DLL 函式接收公尺結果 |
傳回值
Pascal 與 ActiveX 回傳公尺距離,兩點重合時為零;輸入無效時回傳零。DLL 函式在座標有效時回傳 1(含兩點重合)。座標無效時回傳 0,並把可寫入的距離結果設為零
備註
一般路徑在 WGS 84 橢球上量測。反向解在對蹠點附近不收斂時,距離改用平均半徑的球面近似。不需要開啟文件
另請參閱
PagePointToLatLon · LatLonToPagePoint · GeodesicPolygonAreaSqMeters · PageGeoViewportDistanceMeters