關於經緯度分類以及轉換

2021-10-02 23:37:19 字數 536 閱讀 5421

一、介紹

1. 地球座標 (wgs84)

國際標準,從專業gps 裝置中取出的資料的座標系

國際地圖提供商使用的座標系

2. 火星座標 (gcj-02)也叫國測局座標系

中國標準,從國行移動裝置中定位獲取的座標資料使用這個座標系

國家規定: 國內出版的各種地圖系統(包括電子形式),必須至少採用gcj-02對地理位置進行首次加密。

二、轉換

/**

* @param double $lng 經度

* @param double $lat 緯度

*/private function convert_gcj02_to_bd09($lng,$lat)

/** * @param double $lng 經度

* @param double $lat 緯度

*/private function convert_bd09_to_gcj02($lng,$lat)

經緯度座標轉換

經緯度與xy座標轉換工具類 public class latlngxyzconverthelper xy轉經緯度 需要轉換的x座標 需要轉換的y座標 地圖級別 轉換後的經度 轉換後的緯度 public static void tiletolatlng double tile x,double til...

經緯度格式轉換

public float dufenmiaotodu float d,float f,float m public float dutodufen fen float d public float fentofenmiao miao float f float 有效數字位數 6 double 有效數...

NEMA資料經緯度轉換

一.gps模組在定位後會輸出含有各項定位資訊的 nmea語句,其中包括經緯度 資訊,例如串列埠輸出內容 gpgga,054514.000,2238.5260,n,11401.9686,e,1,7,1.27,89.2,m,2.3,m,7f gpgsa,a,3,08,23,10,28,09,04,02,...