[英]how can you set the geographical projection with datashader?
那是一個好看的變形蟲::-)
Datashader 是一種通用工具,與地理數據無關。 特別是,如果要將數據投影到其他坐標系中,則需要在調用 Datashader 之前對其進行投影; Datashader 所做的就是渲染它所提供的內容。
Datashader does include one utility function for the special case of projecting lon/lat data into Web Mercator (datashader.utils.lnglat_to_meters), for convenience with plotting libraries that use Web Mercator mapping tiles, but if you are visualizing the data on its own (沒有覆蓋在地圖上)您甚至不需要該實用程序; 裸露的經/緯度值應該沒問題。
如果您想要一些特定的縱橫比,您可以使用 Canvas 構造函數的參數來確定它。 具體來說,將plot_height
和plot_width
設置為您想要的任何圖像大小,然后將 x_range 和 y_range 設置為該圖像大小中您想要的數據空間范圍(例如,經度和緯度范圍,如xrange=(270, 290), yrange=(30,40)
)。
或者,您可以使用 hvplot.holoviz.org 或 holoviews.org 上的高級界面覆蓋到 map,這將強制地理縱橫比。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.