久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='7QeeR'></bdo><ul id='7QeeR'></ul>
  • <tfoot id='7QeeR'></tfoot>

    <i id='7QeeR'><tr id='7QeeR'><dt id='7QeeR'><q id='7QeeR'><span id='7QeeR'><b id='7QeeR'><form id='7QeeR'><ins id='7QeeR'></ins><ul id='7QeeR'></ul><sub id='7QeeR'></sub></form><legend id='7QeeR'></legend><bdo id='7QeeR'><pre id='7QeeR'><center id='7QeeR'></center></pre></bdo></b><th id='7QeeR'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7QeeR'><tfoot id='7QeeR'></tfoot><dl id='7QeeR'><fieldset id='7QeeR'></fieldset></dl></div>

      <legend id='7QeeR'><style id='7QeeR'><dir id='7QeeR'><q id='7QeeR'></q></dir></style></legend>

      <small id='7QeeR'></small><noframes id='7QeeR'>

      1. R傳單地圖上的疊加圖像

        Overlay image on R leaflet map(R傳單地圖上的疊加圖像)
        <i id='dMlr4'><tr id='dMlr4'><dt id='dMlr4'><q id='dMlr4'><span id='dMlr4'><b id='dMlr4'><form id='dMlr4'><ins id='dMlr4'></ins><ul id='dMlr4'></ul><sub id='dMlr4'></sub></form><legend id='dMlr4'></legend><bdo id='dMlr4'><pre id='dMlr4'><center id='dMlr4'></center></pre></bdo></b><th id='dMlr4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='dMlr4'><tfoot id='dMlr4'></tfoot><dl id='dMlr4'><fieldset id='dMlr4'></fieldset></dl></div>

            <tbody id='dMlr4'></tbody>

              • <bdo id='dMlr4'></bdo><ul id='dMlr4'></ul>
              • <legend id='dMlr4'><style id='dMlr4'><dir id='dMlr4'><q id='dMlr4'></q></dir></style></legend>
              • <tfoot id='dMlr4'></tfoot>
                1. <small id='dMlr4'></small><noframes id='dMlr4'>

                  本文介紹了R傳單地圖上的疊加圖像的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有一個 .PNG 圖像,它基本上代表光柵,但不是光柵格式.這些是提供給我的,否則我會自己將它們生成為柵格并避免這個問題.

                  I have a .PNG image which fundamentally represents is raster, but is not in a raster format. These are provide to me, otherwise I would generate them as rasters myself and avoid this problem.

                  我想將圖像疊加在 R 中的傳單底圖上.圖像疊加將為用戶在區(qū)域周圍繪制邊界框提供參考,并在數(shù)據(jù)庫中查詢生成柵格的原始數(shù)據(jù)那個地區(qū).

                  I would like to overlay the image on a leaflet basemap in R. The image overlay will just provide a reference for the user to draw a bounding box around a region, and query a database for the raw data that generated the raster in that region.

                  在 Python 的小冊子實現(xiàn)中,可以通過這種方式疊加圖像

                  In Python's implementation of leaflet the image overlay is possible in this manner

                  center = [0,0]
                  zoom = 2
                  
                  m = Map(center=center, zoom=zoom)
                  layer = ImageOverlay(url="filename.png", bounds=(( min_lat, min_lon), 
                                                               (max_lat, max_lon)))
                  m.add_layer(layer)
                  return m
                  

                  到目前為止,它看起來像在 R 中執(zhí)行此操作,我需要一個光柵對象,然后使用 addRasterImage(),它似乎將光柵轉換為 RGB 圖像,然后將其覆蓋在傳單上地圖.我最初有一個圖像,只想將其添加為圖層而不是需要光柵格式.謝謝.

                  Thus far it looks like to do this in R, I need a raster object that then use addRasterImage(), which appears to converts the raster to a RGB image and then overlays it on the leaflet map. I have an image initially and just want add it as a layer rather than a requiring a raster format. Thank you.

                  推薦答案

                  如果您需要附加圖像并且之后不更改它(bbox 或源),那么您應該能夠使用 htmlwidgets 訪問本機傳單.js:

                  If you need to append the image and not change it afterwards (bbox or source), then you should be able to do that using htmlwidgets to access native leaflet.js:

                  htmlwidget::onRender 函數(shù)可用于添加自定義行為使用本機 Javascript 到傳單地圖.這是一個什么高級用例,要求您了解 Javascript.使用 onRender您可以使用定義的任何 API 自定義地圖的行為在 Leaflet.js 文檔中.(來自傳單 r 文檔)

                  The htmlwidget::onRender function can be used to add custom behavior to the leaflet map using native Javascript. This is a some what advanced use case and requires you to know Javascript. Using onRender you can customize your map’s behavior using any of the APIs as defined in the Leaflet.js documentation. (from leaflet r documentation)

                  通過展示更廣泛的本機功能,這為您提供了更多的靈活性.添加圖像覆蓋非常簡單(example)并且類似于 python執(zhí)行.從 r 和 js 文檔版本中采用的一個簡單示例可能如下所示:

                  This gives you a bit more flexibility by revealing the more extensive native functionality. To add an image overlay is rather straightforward (example) and similar to the python implementation. A simple example adopted from the r and js documentation versions might look like:

                  library(leaflet)
                  
                  m <- leaflet() %>%
                    addTiles() %>%  # Add default OpenStreetMap map tiles
                    addMarkers(lng=-74.22655, lat=40.712216, popup="Bottom Right Corner") %>%
                    htmlwidgets::onRender("
                        function(el, x) {
                          console.log(this);
                          var myMap = this;
                          var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg';
                          var imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];
                  
                          L.imageOverlay(imageUrl, imageBounds).addTo(myMap);
                        }
                        ")
                  m  # Print the map
                  

                  這篇關于R傳單地圖上的疊加圖像的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to bind a function to an Action from Qt menubar?(如何將函數(shù)綁定到 Qt 菜單欄中的操作?)
                  PyQt progress jumps to 100% after it starts(PyQt 啟動后進度躍升至 100%)
                  How to set yaxis tick label in a fixed position so that when i scroll left or right the yaxis tick label should be visible?(如何將 yaxis 刻度標簽設置在固定位置,以便當我向左或向右滾動時,yaxis 刻度標簽應該可見
                  `QImage` constructor has unknown keyword `data`(`QImage` 構造函數(shù)有未知關鍵字 `data`)
                  Change x-axis ticks to custom strings(將 x 軸刻度更改為自定義字符串)
                  How to show progress bar while saving file to excel in python?(如何在python中將文件保存為excel時顯示進度條?)
                    <tbody id='fFfkL'></tbody>
                  <tfoot id='fFfkL'></tfoot>
                    <legend id='fFfkL'><style id='fFfkL'><dir id='fFfkL'><q id='fFfkL'></q></dir></style></legend>
                      <i id='fFfkL'><tr id='fFfkL'><dt id='fFfkL'><q id='fFfkL'><span id='fFfkL'><b id='fFfkL'><form id='fFfkL'><ins id='fFfkL'></ins><ul id='fFfkL'></ul><sub id='fFfkL'></sub></form><legend id='fFfkL'></legend><bdo id='fFfkL'><pre id='fFfkL'><center id='fFfkL'></center></pre></bdo></b><th id='fFfkL'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='fFfkL'><tfoot id='fFfkL'></tfoot><dl id='fFfkL'><fieldset id='fFfkL'></fieldset></dl></div>
                        <bdo id='fFfkL'></bdo><ul id='fFfkL'></ul>

                        • <small id='fFfkL'></small><noframes id='fFfkL'>

                            主站蜘蛛池模板: 国产精品精品视频一区二区三区 | www.久久影视| 91激情电影| 三级黄色片在线观看 | 久久高清国产 | 另类专区成人 | 伊人精品久久久久77777 | www.夜夜骑.com | 久久久久久国产精品免费 | 国产高清免费视频 | 中文字幕在线观看av | 久久99网 | 久久国产精品精品国产色婷婷 | 91高清在线观看 | 拍真实国产伦偷精品 | 国产精品一区二区三区四区五区 | 精品国产乱码久久久久久牛牛 | 99热精品6 | 久久精品99 | 日韩精品免费 | av一级久久| 欧美一区二区三区,视频 | 久久久久国产精品 | 国产免费看 | 欧美亚洲国产日韩 | 麻豆va| 国产黄色在线观看 | 中文字幕在线一区二区三区 | 亚洲精品在线免费播放 | 成人天堂 | 日本小电影在线 | 激情毛片 | 欧美午夜精品 | www精品美女久久久tv | 天堂国产 | 欧美一区二区网站 | 国产精品自拍啪啪 | 精品一二三区视频 | 亚洲久在线 | 国产亚洲一区二区三区 | 久久蜜桃av一区二区天堂 |