Python MapBox 지도 visualize
import pydeck def viz(mdf): # 2014 locations of car accidents in the UK UK_ACCIDENTS_DATA = ('https://raw.githubusercontent.com/uber-common/' 'deck.gl-data/master/examples/3d-heatmap/heatmap-data.csv') layer = pydeck.Layer( 'ScatterplotLayer', mdf, get_position='[x, y]', auto_highlight=True, elevation_scale=50, pickable=True, elevation_range=[0, 1], extruded=True, get_radius=10, get_fill_color=[..
2020. 5. 11.
주로 쓰는 좌표계 정리
http://www.localdata.kr/ 여기서 x,y가 쓰는 좌표: TM좌표계 +proj=tmerc +lat_0=38 +lon_0=127.0028902777778 +k=1 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs +towgs84=-115.80,474.99,674.11,1.16,-2.31,-1.63,6.43 UTM-K (EPSG:5178) +proj=tmerc +lat_0=38 +lon_0=127.5 +k=0.9996 +x_0=1000000 +y_0=2000000 +ellps=bessel +units=m +no_defs +towgs84=-115.80,474.99,674.11,1.16,-2.31,-1.63,6.43 KATEC 카텍좌표계 +pro..
2020. 4. 8.
Proj Transformer 좌표 변환
from pyproj import Proj, transform inProj = Proj('+proj=tmerc +lat_0=38 +lon_0=127.0028902777778 +k=1 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs +towgs84=-115.80,474.99,674.11,1.16,-2.31,-1.63,6.43') outProj = Proj(init='epsg:4326') x1,y1 = yldf.iloc[0].x, yldf.iloc[0].y x2,y2 = transform(inProj,outProj,x1,y1) print (y2,',',x2) 간단하게는 이렇게 바꾸거나 from pyproj import Transformer transform..
2020. 4. 8.
GeoPandas 에서 GeoWithin Query하기
우리가 원하는 범위의 Polygon이 아래와 같은 형태라고 하자. yunnam_large = {'type': 'Polygon', 'coordinates': [[[126.92572992898702, 37.55835818322421], [126.92616538295539, 37.55864227038824], [126.92658623986753, 37.55938810776263], [126.92677406036564, 37.56118120785994], [126.9282886257802, 37.56334452890169], [126.92638553613328, 37.56494713073428], [126.9243245551222, 37.565900883346934], [126.9196036221869, 37...
2020. 3. 17.