ImageOverlay behaviour with WG84 rasters
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, python
研究方向
首先,使用 rasterio 和 folium.ImageOverlay 重現所提供的 TIFF 範例,然後將其對 EPSG:4326 的處理方式與 QGIS 中的 EPSG:3857 結果進行比較。搭配 Leaflet 對 image-overlay 的預期,閱讀 ImageOverlay 的投影與 bounds 行為;當差異獲得解釋,且 issue 的預期渲染結果或限制獲得記錄時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
I have a non-expected result when using this code (the raster used is attached to this message):
raster_path = '2019-06-15.tiff'
with rasterio.open(raster_path) as src:
raster_data = src.read(1)
bounds = src.bounds
m = folium.Map(location=[(bounds.top + bounds.bottom) / 2, (bounds.left + bounds.right) / 2], zoom_start=10)
# Create an ImageOverlay
img_overlay = ImageOverlay(
image=raster_data,
bounds=[[bounds.bottom, bounds.left], [bounds.top, bounds.right]],
opacity=0.6,
interactive=False,
cross_origin=True,
zindex=1,
mercator_project=True
)
# Add the overlay to the map
img_overlay.add_to(m)
m.save('map.html')
Indeed, my result html map presents shapes that are not consistent with the same map I could have just by using QGIS.
For instance the result of this code gives this in a specific region:
while using QGIS in an EPSG:3857 projection system gives this:
My raster has natively an EPSG:4326 projection system. I suspect the issue comes from how ImageOverlay changes the projection system.
Can anyone reproduce this and explain how I could obtain the same result as in QGIS which is the correct reference for me?
Thanks,
Vivien
- 主要語言
- Python
- 星號
- 7.4k
- 分支
- 2.3k
- 平均合併
- 2 天 4 小時
- 30 天內合併 PR
- 10
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
python-visualization/folium 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
python-visualization/folium#2293 · 2 則留言 ·
維護者通常 1 天內回覆
-
Make it more obvious how to add text可能已有人在做 @mosessamofficial-sys 於 227 天前認領。 未關閉documentation
難度 2/5 1-3 小時 新手友好度 68/100
python-visualization/folium#2092 · 5 則留言 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 25/100
python-visualization/folium#2259 ·
維護者通常 1 天內回覆
-
Map output from OSM returns blocked tiles, due to defective request or not following referer-policy未關閉
難度 3/5 1-2 天 新手友好度 55/100
python-visualization/folium#2236 · 8 則留言 · 2 個 reaction ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 10/100
python-visualization/folium#2219 · 2 則留言 ·
維護者通常 1 天內回覆
查看 python-visualization/folium 的全部 Issue
相似的 Issue
-
python-version
難度 1/5 1 小時以內 新手友好度 88/100
-
bug
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
bug javascript P2-medium python release:v3.1
難度 2/5 1-3 小時 新手友好度 68/100
adrirubio/claude-deck#546 ·
維護者通常 1 天內回覆
-
area: desktop area: website priority: P2 type: feature
難度 2/5 1-3 小時 新手友好度 62/100
appandflow/stim#3411 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1 小時以內 新手友好度 88/100
baptistehamon/lsapy#185 ·
維護者通常 1 天內回覆