[英]Geopandas shapefile axis not on same scale as actual picture
我正在閱讀本教程,所有內容看起來都一樣https://towardsdatascience.com/geopandas-101-plot-any-data-with-a-latitude-and-longitude-on-a-map-98e01944b972
那就是我要顯示地圖,數據框看起來像是相同的格式,等等。但是,軸比例尺很奇怪,達到+ 1M,這導致所有點都以(0,0)坐標正確渲染。 有人知道我在做什么錯嗎? 應該是正常的長/緯軸
這是我用於街道圖的代碼:
street_map = gdp.read_file('/Users/mkjacks5/Documents/projects/Mobile data/data/geo/Maricopa_Street_Local_2013.shp')
這是情節本身的代碼
fig, ax = plt.subplots(figsize=(5,5))
street_map.plot(ax = ax,alpha = 0.4,顏色=“ blue”)geo_df.plot(ax = ax,markersize = 50,color =“ red”,marker =“ ^”,label =“ Destination”)plt。圖例(丙= { '尺寸':15})
我正在使用將長緯度坐標編碼為點
crs = {'init' :'epsg:4326'}
可以使用
crs = from_string("+proj=longlat +datum=WGS84 +no_defs")
street_map = street_map.to_crs(crs=crs)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.