진행하고 있던 프로젝트에서 지도 정보가 필요하여 찾아봤던 자료들 입니다.
무료로 좌표계를 받을수 있는 곳을 찾기가 힘들어 고생했던 기억이 있어서 그당시 찾아봤던 site들을 정리해봤습니다.
결국 위도 경도 정보를 data로 구해야 해서 저는 python panda로 data를 구했었습니다.
https://www.esrikr.com/arcgis-guide/arcgis-pro-master-2/
지도 정보 찾기
Global Map data archives
https://globalmaps.github.io/glcnmo.html#code
http://www.diva-gis.org/datadown
https://datascienceschool.net/view-notebook/ef921dc25e01437b9b5c532ba3b89b02/
pandas
import geopandas as gpd
import matplotlib.pyplot as plt
import matplotlib.path as mpath
import matplotlib.patches as mpatches
gpd.__version__
def get_pos(PosData) :
return PosData[0],PosData[1]
print(gpd.__version__)
countries = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
cities = gpd.read_file(gpd.datasets.get_path('naturalearth_cities'))
#countries.tail(3)
print(countries.name)
china = countries[countries.name == "China"].geometry
china.boundary.squeeze()
china.plot()
rect = china.total_bounds
fig = plt.figure()
ax =fig.add_axes(rect,)
fig.delaxes(ax)
fig.add_axes(ax)
# sub plot
# ax = plt.subplots()
# pos = [[china.total_bounds[0],china.total_bounds[1]],
# [china.total_bounds[2],china.total_bounds[1]],
# [china.total_bounds[2],china.total_bounds[3]],
# [china.total_bounds[0],china.total_bounds[3]]]
# Path = mpath.Path
# path_data = [
# (Path.MOVETO, (pos[0])),
# (Path.LINETO, (pos[1])),
# (Path.LINETO, (pos[2])),
# (Path.LINETO, (pos[3])),
# (Path.CLOSEPOLY, (pos[0])),
# ]
# ax.plot(path_data)
# #
# codes, verts = zip(*path_data)
# path = mpath.Path(verts, codes)
# patch = mpatches.PathPatch(path, facecolor='r', alpha=0.5)
# ax.add_patch(patch)
# x, y = zip(*path.vertices)
# line, = ax.plot(x, y, 'go-')
# ax.grid()
# ax.axis('equal')
plt.figimage(fig)
plt.show()
#china.
with open("china_map.txt", mode='wt') as f:
f.write(china)
print(china)
#ax.set_title("세계 지도")
#ax.set_axis_off()
#print(countries)
i=0
while 1 :
i+=i
결과
result:
"{\"type\": \"FeatureCollection\", \"features\": [{\"id\": \"139\", \"type\": \"Feature\", \"properties\": {}, \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[109.47520958866365, 18.197700913968575], [108.65520796105616, 18.507681993071387], [108.62621748254044, 19.367887885001906], [109.11905561730804, 19.821038519769345], [110.21159874882281, 20.101253973872033], [110.78655073450221, 20.077534491450052], [111.01005130416458, 19.69592987719072], [110.57064660038677, 19.25587921800927], [110.33918786015147, 18.678395087147592], [109.47520958866365, 18.197700913968575]]], [[[80.2599902688853, 42.34999929459906], [80.1801501809943, 42.92006785742694], [80.86620649610126, 43.18036204688101], [79.96610639844141, 44.91751699480463], [81.9470707539181, 45.31702749285312], [82.45892581576906, 45.539649563166506], [83.18048383986047, 47.33003123635086], [85.16429039911324, 47.0009557155161], [85.72048383987067, 47.452969468773105], [85.7682328633083, 48.45575063739699], [86.59877648310336, 48.549181626980626], [87.35997033076265, 49.21498078062912], [87.75126427607671, 49.297197984405486], [88.01383222855173, 48.599462795600616], [88.85429772334676, 48.069081732772965], [90.28082563676392, 47.69354909930793], ...
'개발 Note > it 이야기' 카테고리의 다른 글
DevOps 선택하기... (0) | 2022.05.25 |
---|---|
SW를 개발하기 위해서는 가장 중요한것이 무엇인가?? (0) | 2021.08.20 |
AI assistant battle (1) | 2019.10.29 |
Synergy (0) | 2019.09.27 |
Galaxy Home - mini (0) | 2019.08.28 |