matlab geotiff,(Not recommended) Read GeoTIFF file[通俗易懂]

matlab geotiff,(Not recommended) Read GeoTIFF file[通俗易懂]geotiffread(Notrecommended)ReadGeoTIFFfilegeotiffreadisnotrecommended,exceptwhenreadingaGeoTIFFfilefromaURLorwhenreadingmultipleimagesfromthesamefile.Inothersituations,user…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

geotiffread

(Not recommended) Read GeoTIFF file

geotiffread is not recommended, except when reading a GeoTIFF

file from a URL or when reading multiple images from the same file. In other situations,

use readgeoraster instead. For more information, see Compatibility Considerations.

Description

[A,R] = geotiffread(filename)

reads a georeferenced grayscale, RGB, or multispectral image or data grid from the

GeoTIFF file specified by filename into A

and creates a spatial referencing object, R.

[X,cmap,R]

= geotiffread(filename)

reads an indexed image into X and the associated colormap into

cmap, and creates a spatial referencing object,

R.

[A,refmat,bbox]

= geotiffread(filename)

reads a georeferenced grayscale, RGB, or multispectral image or data grid into

A, the corresponding referencing matrix into

refmat, and the bounding box into bbox.

X, the associated colormap into

cmap, the referencing matrix into

refmat, and the bounding box into

bbox. The referencing matrix must be unambiguously defined by

the GeoTIFF file, otherwise it and the bounding box are returned empty.

[___] = geotiffread(url)

reads the GeoTIFF image from a URL.

[___] = geotiffread(___,idx)

reads one image from a multi-image GeoTIFF file or URL.

Examples

Read and Display the Boston GeoTIFF Image

[boston,R] = geotiffread(‘boston.tif’);

figure

mapshow(boston,R);

axis image off

cf58e00b1d87ddd52dee48593dfc71f8.gif

boston.tif copyright © GeoEye™, all rights reserved.

Input Arguments

filename — Name of GeoTIFF file

character vector | string scalar

Name of the GeoTIFF file, specified as a string scalar or character

vector. Include the folder name in filename or place the

file in the current folder or in a folder on the MATLAB® path. If the named file includes the extension

.TIF or .TIFF (either upper- or

lowercase), you can omit the extension from

filename.

idx — Index of image in GeoTIFF file

1 (default) | positive integer

Index of image in GeoTIFF file, specified as a positive integer. For

example, if idx is 3,

geotiffread reads the third image in the file. By

default, idx indexes to the first image in the

file.

url — Internet URL

character vector | scalar string

Internet URL, specified as a string scalar or character vector. The URL

must include the protocol type (e.g., “https://”).

Output Arguments

A — Georeferenced image or data grid

M-by-N numeric matrix | M-by-N-by-P

numeric array

Georeferenced image or data grid, returned as one of the following:

An M-by-N numeric matrix

when the file contains a grayscale image or data grid

An

M-by-N-by-P

numeric array when the file contains a color image,

multispectral image, hyperspectral image, or data grid

The class of A depends on the storage class of the

pixel data in the file, which is related to the

BitsPerSample property as returned by the imfinfo function.

R — Spatial referencing object

geographic raster reference object | map raster reference object

Spatial referencing object, returned as one of the following.

A geographic raster reference object of type GeographicCellsReference or GeographicPostingsReference. This object is

returned when the image or data grid is referenced to a

geographic coordinate system.

A map raster reference object of type MapCellsReference or

MapPostingsReference. This object is returned when the

image or data grid is referenced to a projected coordinate

system.

X — Indexed image

M-by-N numeric matrix

Indexed image, returned as an M-by-N

numeric matrix.

cmap — Color map

c-by-3 numeric matrix

Color map associated with indexed image X, specified

as an c-by-3 numeric matrix. There are

c colors in the color map, each represented by a red,

green, and blue pixel value. Colormap values are rescaled into the range

[0,1].

refmat — Referencing matrix

3-by-2 numeric matrix | []

Referencing matrix, returned as 3-by-2 numeric matrix that transforms

raster row and column indices to or from geographic coordinates according

to:

[lon lat] = [row col 1] * refmat

refmat defines a (non-rotational, non-skewed)

relationship in which each column of the data grid falls along a meridian

and each row falls along a parallel. refmat must be

unambiguously defined by the GeoTIFF file, otherwise it and the bounding

box, bbox, are returned empty.

Data Types:double

bbox — Bounding box

2-by-2 numeric matrix | []

Bounding box, returned as a 2-by-2 numeric matrix that specifies the

minimum (row 1) and maximum (row 2) values for each dimension of the image

data in the GeoTIFF file. bbox is returned empty if

refmat is ambiguously defined by the GeoTIFF

file.

Data Types:double

Tips

geotiffread imports pixel data using the TIFF-reading

capabilities of the MATLAB function imread and likewise shares any

limitations of imread. Consult the imread

documentation for information on TIFF image support.

Compatibility Considerations

geotiffread is not recommended

Not recommended starting in R2020a

geotiffread is not recommended, except when reading a GeoTIFF

file from a URL or when reading multiple images from the same file. In other

situations, use readgeoraster instead. There are no plans to remove

geotiffread.

Unlike geotiffread, which returns a referencing matrix in

some cases, the readgeoraster function returns a raster

reference object. Reference objects have several advantages over referencing matrices.

Unlike referencing matrices, reference objects have properties that

document the size of the associated raster, its limits, and the

direction of its rows and columns. For examples of reference object

properties, see GeographicCellsReference and

MapPostingsReference.

You can manipulate the limits of rasters associated with reference

objects using the geocrop or mapcrop functions.

You can manipulate the size and resolution of rasters associated with

reference objects using the georesize or mapresize functions.

This table shows some typical usages of geotiffread and how

to update your code to use readgeoraster instead. Unlike

geotiffread, the readgeoraster

function requires you to specify a file extension. For example, use [Z,R] =

readgeoraster(‘boston.tif’).

Not RecommendedRecommended[A,R] = geotiffread(filename);[A,R] = readgeoraster(filename);

[X,cmap,R] = geotiffread(filename);[X,R,cmap] = readgeoraster(filename);

[A,refmat,bbox] = geotiffread(filename);[A,R] = readgeoraster(filename);

xlimits = R.XWorldLimits;

ylimits = R.YWorldLimits;

bbox = [xlimits’ ylimits’];

Introduced before R2006a

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/188821.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • c#Parallel.ForEach控制线程数量

    c#Parallel.ForEach控制线程数量List<int>listI=newList<int>();for(inti=0;i<1000;i++){listI.Add(i);}ParallelOptionsoptions=newParallelOptions();option..

    2022年7月19日
    14
  • Java 构造函数的详解

    Java 构造函数的详解我们人出生的时候,有些人一出生之后再起名字的,但是有些人一旦出生就已经起好名字的。那么我们在java里面怎么在对象一旦创建就赋值呢?1.构造方法的作用:构造方法作用:对对象进行初始化.如图:2.构造函数与普通函数的区别:(1). 一般函数是用于定义对象应该具备的功能。而构造函数定义的是,对象在调用功能之前,在建立时,应该具备的一些内容。也就是对象的初

    2022年7月8日
    23
  • c语言c99版本支持Vla,C语言中的VLA问题

    c语言c99版本支持Vla,C语言中的VLA问题我在 MacOSX10 11 上运行 Xcode7 1 我试图在 C 中声明一个 VLA 数组 但我不能这样做 第二个我在数组声明中使用了一个变量 这没有实际意义 数组不会被创建 我在编译器设置中挖了一下 尝试手动安装 GCC 我无法弄清楚这一点 谁能发现这个问题 根据我的理解 VLA 自 C99 起成为标准 而且我可以告诉我的 Xcode 在 C11 上运行 这是什么交易 包含代码和设置图像 voidprintT

    2025年10月2日
    2
  • 一般人到底要不要学Python_Python值得学吗

    一般人到底要不要学Python_Python值得学吗前言本人纯屌丝一枚,在学python之前对电脑的认知也就只限于上个网,玩个办公软件。这里不能跑题,我为啥说自学python,一般人我还是劝你算了吧。因为我就是那个一般人。基础真的很简单,是个人稍微认点真都能懂,这就是好多人说的python简单、易懂、好学,然后就是一顿浮夸的言论,误导那些小白,再然后那些小白也就跟着浮夸。这里我就给那些轻浮的人泼一桶冷水,懂跟学会是一码事吗?先来说哈python这个就业哈,我现在生活在祖国的肚皮上–成都,(嗯,有想了解川西迷你小环线的在下面留言哦),下面亲身经历,我喃,

    2025年8月30日
    7
  • 0~9迷你上标小数字复制_下标1

    0~9迷你上标小数字复制_下标1A⁰¹²³⁴⁵⁶⁷⁸⁹B₀₁₂₃₄₅₆₇₈₉

    2022年9月30日
    4
  • java的db是什么_java db[通俗易懂]

    java的db是什么_java db[通俗易懂]关于javadb的搜索结果问题关于DB+RECORD操作oracle数据库的问题?报错@JFinal你好,想跟你请教个问题:我操作oracle数据库,插入一条记录Recorduser=newRecord().set(“userid”,…爱吃鱼的程序员2020-06-2220:22:060浏览量回答数1回答为什么不用分页查询是为了导出Excel使用的,前台页面的分页查询没有问题…

    2022年7月7日
    44

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号