作為政府推動的開放資料專案的一部分,我所在的城市通過網路要素服務提供了一些地理資料。第三方確實將其中一些資料轉換為 GeoJSON,因此更多人可以使用它。資料如下所示:
{
"type": "FeatureCollection",
"name": "Hauskoordinaten",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{
"type": "Feature",
"id": 5,
"properties": {
"objectid": "5",
"strschl": "1",
"adresse": "Aachener Str. *",
"strname": "Aachener Str.",
"x": "32359072.929",
"y": "5701476.297"
},
"geometry": {
"type": "Point",
"coordinates": [
6.971984166915553,
51.446915354002748
]
}
},
{ "type": "Feature", "id": 6, "properties": { "objectid": "6", "strschl": "1", "hsnr": "1", "adresse": "Aachener Str. 1", "strname": "Aachener Str.", "x": "32359252.047", "y": "5701464.014" }, "geometry": { "type": "Point", "coordinates": [ 6.974564923492866, 51.446849521064742 ] } },
{ "type": "Feature", "id": 7, "properties": { "objectid": "7", "strschl": "1", "hsnr": "2", "adresse": "Aachener Str. 2", "strname": "Aachener Str.", "x": "32359267.632", "y": "5701483.058" }, "geometry": { "type": "Point", "coordinates": [ 6.974781475486739, 51.447024527120796 ] } },
{ "type": "Feature", "id": 8, "properties": { "objectid": "8", "strschl": "1", "hsnr": "3", "adresse": "Aachener Str. 3", "strname": "Aachener Str.", "x": "32359236.486", "y": "5701463.429" }, "geometry": { "type": "Point", "coordinates": [ 6.974341375868697, 51.446840396580718 ] } },
{ "type": "Feature", "id": 9, "properties": { "objectid": "9", "strschl": "1", "hsnr": "4", "adresse": "Aachener Str. 4", "strname": "Aachener Str.", "x": "32359252.073", "y": "5701482.515" }, "geometry": { "type": "Point", "coordinates": [ 6.97455793901083, 51.447015780957109 ] } }
]
}
如果我將此資料加載到一個隨機的在線 GeoJSON 可視化工具中,它看起來就很好。
如果我嘗試將這些坐標輸入谷歌地圖,我必須交換它們的順序:6.97455793901083, 51.447015780957109是海洋中的某個隨機點,51.447015780957109, 6.97455793901083是我想要的并且看起來正確的點。
作為一個對制圖、地理、地圖投影等一無所知的人:為什么會這樣?資料格式是否例外?GeoJSON 是否出于某種原因需要“交換”格式?還是谷歌地圖不符合要求?
uj5u.com熱心網友回復:
GeoJSON 和 Google 地圖的順序不同。
GeoJSON中的位置定義為:
3.1.1。位置
位置是一個數字陣列。必須有兩個或更多元素。 前兩個元素是 longitude 和 latitude,或easting 和northing ,正是按照這個順序并使用十進制數。
谷歌地圖(未按名稱或物件規范指定)使用緯度、經度順序。
來自:谷歌地圖幫助:發現坐標或按緯度和經度搜索
格式化您的坐標
要格式化您的坐標以便它們在 Google 地圖中使用,請使用以下格式的十進制度:
正確:41.40338、2.17403
不正確:41,40338、2,17403
提示:
在經度坐標之前列出您的緯度坐標。(強調我的)
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/516876.html
