GeoJSON和谷歌地图中的不同坐标格式



作为政府驱动的开放数据项目的一部分,我所在的城市通过Web功能服务提供了一些地理数据。第三方确实将其中一些数据转换为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是否需要";交换的";总体安排还是谷歌地图是一个不符合要求的地图?

GeoJSON和Google Maps的排序不同。

长期以来一直存在分歧(纬度/经度与x/y(。有关一些历史记录,请参见Geotools::Axis Order。

GeoJSON中的位置定义为:

3.1.1.位置
位置是一个数字数组。必须有两个或两个以上元素前两个元素是经度和纬度,或者东距和北距,按该顺序精确排列,并使用十进制数字

谷歌地图(其中未由名称或对象规范指定(使用纬度、经度的顺序。

来自:谷歌地图帮助:发现坐标或按纬度搜索&经度

设置坐标格式
若要设置坐标格式以使其在谷歌地图中工作,请按以下格式使用小数度数:
正确:41.403381.7403
不正确:4140358217403
提示:

在经度坐标之前列出纬度坐标

最新更新