Преобразуйте информацию о GeoTIFF, чтобы сопоставить структуру проекции
mstruct = geotiff2mstruct(proj)
mstruct = geotiff2mstruct(proj) преобразовывает структуру проекции GeoTIFF, proj, к структуре проекции карты, mstruct. Единица продолжительности проекции mstruct является метром.
Структура проекции GeoTIFF, proj, должна сослаться на спроектированную систему координат, как обозначено значением 'ModelTypeProjected' в поле ModelType. Если ModelType имеет значение 'ModelTypeGeographic' затем, это не целесообразно преобразовывать в структуру проекции карты, и ошибка выпущена.
% Compare inverse transform of points using projinv and minvtran.
% Obtain the projection structure of 'boston.tif'.
proj = geotiffinfo('boston.tif');
% Convert the corner map coordinates to latitude and longitude.
x = proj.CornerCoords.X;
y = proj.CornerCoords.Y;
[latProj, lonProj] = projinv(proj, x, y);
% Obtain the mstruct from the GeoTIFF projection.
mstruct = geotiff2mstruct(proj);
% Convert the units of x and y to meter to match projection units.
x = unitsratio('meter','sf') * x;
y = unitsratio('meter','sf') * y;
% Convert the corner map coordinates to latitude and longitude.
[latMstruct, lonMstruct] = minvtran(mstruct, x, y);
% Verify the values are within a tolerance of each other.
abs(latProj - latMstruct) <= 1e-7
abs(lonProj - lonMstruct) <= 1e-7
ans =
1 1 1 1
ans =
1 1 1 1