MapBox ESRI数据层 [英] MapBox ESRI Data Layer

查看:114
本文介绍了MapBox ESRI数据层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Mapbox,并想在上面显示一层esri数据.从这个json文件中提取了我正在获取的数据:

I have a mapbox, and want to display a layer of esri data onto it. The data I'm getting is being pulled in from this json file:

data ['results'] [0] ['value'] ['features']数组看起来像这样:

The data['results'][0]['value']['features'] array looks something like this:

[{'attributes':{'key':'value'}},{'geometry':{'paths':[[-13273770,4064608],[-13273762,4064613],....] }}, {'attributes':{'key':'value'}},{'geometry':{'paths':[[-13273770,4064608],[-13273762,4064613],....]}}, {'attributes':{'key':'value'}},{'geometry':{'paths':[[-13273770,4064608],[-13273762,4064613],....]}}}}]]

[{'attributes': {'key':'value'}},{'geometry':{'paths':[[-13273770,4064608],[-13273762,4064613],....]}}, {'attributes': {'key':'value'}},{'geometry':{'paths':[[-13273770,4064608],[-13273762,4064613],....]}}, {'attributes': {'key':'value'}},{'geometry':{'paths':[[-13273770,4064608],[-13273762,4064613],....]}}}]

我的问题是关于几何数组.那里的数据不是Lat/Lng值(我一直希望),所以我不确定如何将这些值添加到地图中.我是GIS的新手,到目前为止我所做的研究都指向了SpatialReferences.任何帮助显然都非常感谢!

My question is about the geometry array. The data there is not Lat/Lng values (which I was hoping for), so I'm not sure how to add these to my map. I'm new to GIS, and the research I've done so far points to SpatialReferences. Any help is obviously much appreciated!

推荐答案

MapBox似乎仅接受纬度和经度坐标(至少据我所知).文件中的坐标来自ESRI 102100(3857)投影系统-提示接近文件的开头:

MapBox seems to only accept Latitude and Longitude coordinates (from what I can tell at least). The coordinates you have in your file come from ESRI 102100 (3857) projection system - the clue is near the beginning of your file:

"spatialReference":{"wkid":102100,"latestWkid":3857} ..."

通常,您必须自己进行转换,将来可能出现的提示的一个很好的链接是:

Normally, you'd have to convert this yourself, a good link for potential tips in the future is:

https://gis.stackexchange.com/questions/9442/arcgis-coordinate-system

但是,在这种情况下,您可以做得容易得多.只需将URL的"outSR"属性从 102100 更改为 4326 (WGS84),然后为您完成.

On this occasion however, you can do something far easier. Simply change the "outSR" property of your URL from 102100 to 4326 (WGS84) and let it do it for you.

查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆