日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

【GDAL】聊聊GDAL的数据模型(二)——Band对象

發布時間:2025/4/16 编程问答 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【GDAL】聊聊GDAL的数据模型(二)——Band对象 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在GDAL中柵格數據直接參與各種計算的重要對象是Band

摘錄官方描述:

Raster Band

A raster band is represented in GDAL with the GDALRasterBand class. It represents a single raster band/channel/layer. It does not necessarily represent a whole image. For instance, a 24bit RGB image would normally be represented as a dataset with three bands, one for red, one for green and one for blue.

Gdal 中數據以Dataset為基礎,具體的柵格數據值被存儲在這個Dataset的Band對象之中,一個Dataset可以存儲多個Band對象。例如RGB色彩模型的圖象,在GDAL的數據模型中被認為是一個擁有3個波段(分別對應R\G\B)的Dataset。

?

A raster band has the following properties:

  • A width and height in pixels and lines. This is the same as that defined for the dataset, if this is a full resolution band.

    ?該值在C#中通過Band.XSize, Band.YSize獲取

  • A datatype (GDALDataType). One of Byte, UInt16, Int16, UInt32, Int32, Float32, Float64, and the complex types CInt16, CInt32, CFloat32, and CFloat64.

    ?

  • A block size. This is a preferred (efficient) access chunk size. For tiled images this will be one tile. For scanline oriented images this will normally be one scanline.

    ?

  • A list of name/value pair metadata in the same format as the dataset, but of information that is potentially specific to this band.

    ?實際上是以String[]方式存儲的(這是C/C++程序員的習慣做法),猜測該matadata即是Dataset中獲取的metadata內容一致,且不全面。

  • An optional description string.

    ?

  • An optional single nodata pixel value (see also NODATA_VALUES metadata on the dataset for multi-band style nodata values).

    在C#中Nodata是對band而言的,理論上如果一個Dataset包含多個Band對象,這些Band對象的Nodata值是不能保證一致的。所以需要分別獲取。另外需要注意的一點是,在創建要寫入數據的Dataset時,為其Band指定Nodata需要考慮這個數據本身的有效值范圍和DataType,設置合適的值。?

?

  • An optional nodata mask band marking pixels as nodata or in some cases transparency as discussed in RFC 15: Band Masks.

    ?

  • An optional list of category names (effectively class names in a thematic image).

    ?

  • An optional minimum and maximum value.

    ?該值用于獲取Band中數據的最大最小統計值,不過測試了下偶爾會出現統計值不正確的情況,建議自己寫方法來處理。

  • An optional offset and scale for transforming raster values into meaning full values (i.e. translate height to meters).

    ?

  • An optional raster unit name. For instance, this might indicate linear units for elevation data.

    ?

  • A color interpretation for the band. This is one of:

    • GCI_Undefined: the default, nothing is known.
    • GCI_GrayIndex: this is an independent gray-scale image
    • GCI_PaletteIndex: this raster acts as an index into a color table
    • GCI_RedBand: this raster is the red portion of an RGB or RGBA image
    • GCI_GreenBand: this raster is the green portion of an RGB or RGBA image
    • GCI_BlueBand: this raster is the blue portion of an RGB or RGBA image
    • GCI_AlphaBand: this raster is the alpha portion of an RGBA image
    • GCI_HueBand: this raster is the hue of an HLS image
    • GCI_SaturationBand: this raster is the saturation of an HLS image
    • GCI_LightnessBand: this raster is the hue of an HLS image
    • GCI_CyanBand: this band is the cyan portion of a CMY or CMYK image
    • GCI_MagentaBand: this band is the magenta portion of a CMY or CMYK image
    • GCI_YellowBand: this band is the yellow portion of a CMY or CMYK image
    • GCI_BlackBand: this band is the black portion of a CMYK image.

    ?

  • A color table, described in more detail later.

    ?

  • Knowledge of reduced resolution overviews (pyramids) if available.

其實在真正使用中,比較重要的無非是數據的nodata、xSize、ySize等等,投影等信息由Dataset獲取。用于應付一般情況下的簡單計算問題不大。

下一篇將詳細解釋一個常規的數據讀取和處理的流程。

轉載于:https://www.cnblogs.com/DannielZhang/p/5183761.html

總結

以上是生活随笔為你收集整理的【GDAL】聊聊GDAL的数据模型(二)——Band对象的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 91看片在线 | 日日干日日操 | 亚洲天堂免费在线 | 一区欧美 | 国产大片一区二区 | wwwxxxx日本| 自拍亚洲综合 | 国产区一区二区三区 | 亚洲熟妇中文字幕五十中出 | 精品成人一区二区 | 爱福利视频广场 | 95香蕉视频 | 久久理论电影 | 国产女女调教女同 | 成人mv| 2024av视频 | 91成人观看 | 与亲女洗澡时伦了毛片 | 91在线精品一区二区三区 | 里番精品3d一二三区 | 黄色大片子| 欧美一级做性受免费大片免费 | 在线观看一二三区 | 97超碰人人澡 | 国产传媒国产传媒 | 日韩一级二级 | 国产h视频 | 欧美xxxx黑人又粗又长密月 | 成人3d动漫一区二区三区91 | 日韩国产在线 | 中文字幕一区二区三区人妻不卡 | 大地资源影视在线播放观看高清视频 | 前任攻略在线观看免费完整版 | 国产精品五区 | 在线第一页| 免费在线看黄色片 | 日本一区二区三区在线免费观看 | 日韩精品在线视频免费观看 | www日本www | 91中文字幕视频 | 91网在线看 | 国产精自产拍久久久久久蜜 | 日本免费黄色 | 成人午夜视频在线播放 | 初尝人妻少妇中文字幕 | 亚洲AV无码国产精品播放在线 | 精品亚洲一区二区三区四区五区 | 国产一区午夜 | 国产精品99久久久久久久女警 | 国产午夜成人久久无码一区二区 | 日p视频在线观看 | 亚洲国产精品久久久久爰色欲 | 中文字幕第10页 | 最近国语视频在线观看免费播放 | 91草视频 | 一级片视频免费观看 | 欧美午夜剧场 | 欧美高清在线观看 | 一区二区自拍 | 亚洲成人激情视频 | 欧美中文字幕一区二区三区 | 欧美美女网站 | 亚洲高清视频在线 | 中文字幕日韩无 | 久久亚洲免费视频 | 一区二区日韩av | 伊人久久爱 | 国产特级黄色录像 | 中文字幕人乱码中文字 | 色综合99久久久无码国产精品 | 成av人在线观看 | 爱如潮水3免费观看日本高清 | 亚洲天堂网在线观看视频 | 亚洲视频五区 | 久久精品大全 | 好妞色妞国产在线视频 | 久久亚洲精品小早川怜子 | 国产人伦精品一区二区三区 | 凹凸精品一区二区三区 | 精品人妻一区二区三区三区四区 | 亚洲欧美在线视频免费 | 黄色三级视屏 | 久久久高清免费视频 | 中文字幕+乱码+中文乱 | 男人日女人的网站 | 亚洲黄网在线 | 欧美色国 | 亚洲av无码一区二区三区在线 | 成人av资源网| 少妇高潮av久久久久久 | 国产在线超碰 | 欧美日韩福利视频 | av网站免费在线播放 | 天天骑夜夜操 | 在线资源站| 69色视频| 在线看片日韩 | 免费福利小视频 | 欧美极品在线视频 |