GeoJSON Coordinates?

痞子三分冷 提交于 2019-12-11 09:51:23

问题


I have a GeoJSON file that I am trying to process in order to draw some features on top of google maps. The problem, however, is that the coordinates are not in the conventional latitude/longitude representation, but rather some large six/seven figure numbers. Example:

    {
      "type": "FeatureCollection",
      "features": [
        {
          "type": "Feature",
          "id": 0,
          "properties": {
            "OBJECTID": 1,
            "YR_BUILT": 1950.0
          },
          "geometry": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  772796.724674999713898,
                  2960766.746374994516373
                ],
                [
                  772770.131549999117851,
                  2960764.944537505507469
                ],
                [
                  772794.544237494468689,
                  2960796.93857
                ],
                [
                  772810.48285000026226,
                  2960784.77685
                ],
                [
                  772796.724674999713898,
                  2960766.746374994516373
                ]
              ]
            ]
          }
        },
      .....
    ]
}

I have been reading about the different coordinates systems, but being new to this I have not reached any where. Ideas?


回答1:


If your coordinate source is in the United States, most likely the coordinate system is some variation of State Plane or UTM. Otherwise, it's some other coordinate system that works best for the country of origin. There are literally thousands of coordinate systems, and it can be difficult to guess which you have based on just the coordinates.

You'll need to find out from the data provider what the coordinate system is, and then use an API in your programming language of choice to reproject the points. proj4 is a popular one, with bindings in many languages, and it has a port to Javascript called proj4js.



来源:https://stackoverflow.com/questions/18043564/geojson-coordinates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!