iOS overlay (MKPolygon) data for all U.S. states?

蹲街弑〆低调 提交于 2019-12-01 05:15:34
Kevin Hakanson

Ran a Google search for us state outline geo coordinates and found stackoverflow question Geographical boundaries of states/provinces -> Google Maps Polygon, which has an answer linking to XML for US state polygons (Colorado data below).

<state name="Colorado" colour="#880000">
  <point lat="37.0004" lng="-109.0448"/>
  <point lat="36.9949" lng="-102.0424"/>
  <point lat="41.0006" lng="-102.0534"/>
  <point lat="40.9996" lng="-109.0489"/>
  <point lat="37.0004" lng="-109.0448"/>
</state>

I also found US State and Country border coordinates with a link to NationalAtlas.com, First Level Administrative Boundaries (States), United States, 2005, but that data looks much more precise than I need.

Another source of data was The State Border Data Set which linked to a file with "geographic coordinates of the line segments that make up the state borders" (Colorado data below).

bordindx, st1st2, milemark, lat, long, st1, st2,
19 ,CO-NE ,0 ,40.003 ,102.051 ,08 ,31 ,
19 ,CO-NE ,68.95 ,41.002 ,102.051 ,08 ,31 ,
19 ,CO-NE ,173.19 ,41.001 ,104.053 ,08 ,31 ,
20 ,CO-NM ,0 ,36.999 ,109.044 ,08 ,35 ,
20 ,CO-NM ,333 ,37 ,103.001 ,08 ,35 ,
21 ,CO-OK ,0 ,37 ,103.001 ,08 ,40 ,
21 ,CO-OK ,52.89 ,36.993 ,102.041 ,08 ,40 ,
22 ,CO-UT ,0 ,41 ,109.049 ,08 ,49 ,
22 ,CO-UT ,276.11 ,36.999 ,109.044 ,08 ,49 ,
23 ,CO-WY ,0 ,41.001 ,104.053 ,08 ,56 ,
23 ,CO-WY ,260.18 ,41 ,109.049 ,08 ,56 ,

Update: I put an refined version of the states.xml, as well as Objective-C code on a kjhsoftware/us-state-polygons github repo.

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