How do I put map_info into customized enviwrite matlab code?
This is my map_info
MapCellsReference with properties:
XWorldLimits: [699960 809760]
YWorldLimits: [3190200 3300000]
RasterSize: [5490 5490]
RasterInterpretation: ‘cells’
ColumnsStartFrom: ‘north’
RowsStartFrom: ‘west’
CellExtentInWorldX: 20
CellExtentInWorldY: 20
RasterExtentInWorldX: 109800
RasterExtentInWorldY: 109800
XIntrinsicLimits: [0.5 5490.5]
YIntrinsicLimits: [0.5 5490.5]
TransformationType: ‘rectilinear’
CoordinateSystemType: ‘planar’
ProjectedCRS: [1×1 projcrs]
I want to put this information into enviwrite code which is as follows
fprintf(fid, ‘ENVIn’);
fprintf(fid, ‘description = {n’);
fprintf(fid, ‘Exported from MATLAB with coordinate and wavelength info}n’);
fprintf(fid, ‘%s %i n’, elements{1}, im_size(2)); % samples
fprintf(fid, ‘%s %i n’, elements{2}, im_size(1)); % lines
fprintf(fid, ‘%s %i n’, elements{3}, im_size(3)); % bands
fprintf(fid, ‘%s %i n’, elements{4}, t); % data type
fprintf(fid, ‘interleave = bsqn’);
fprintf(fid, ‘map info = {%s}n’, coordinate_information.map_info);
fprintf(fid, ‘projection info = {%s}n’, coordinate_information.projection_info);
fprintf(fid, ‘wavelength = {‘);
fprintf(fid, ‘%g, ‘, wavelength_data(1:end-1));
fprintf(fid, ‘%g}n’, wavelength_data(end));
fclose(fid);
I request you to please put above mentioned map_info into this customized enviwrite code. Looking forward for your kind cooperation.
DevendraThis is my map_info
MapCellsReference with properties:
XWorldLimits: [699960 809760]
YWorldLimits: [3190200 3300000]
RasterSize: [5490 5490]
RasterInterpretation: ‘cells’
ColumnsStartFrom: ‘north’
RowsStartFrom: ‘west’
CellExtentInWorldX: 20
CellExtentInWorldY: 20
RasterExtentInWorldX: 109800
RasterExtentInWorldY: 109800
XIntrinsicLimits: [0.5 5490.5]
YIntrinsicLimits: [0.5 5490.5]
TransformationType: ‘rectilinear’
CoordinateSystemType: ‘planar’
ProjectedCRS: [1×1 projcrs]
I want to put this information into enviwrite code which is as follows
fprintf(fid, ‘ENVIn’);
fprintf(fid, ‘description = {n’);
fprintf(fid, ‘Exported from MATLAB with coordinate and wavelength info}n’);
fprintf(fid, ‘%s %i n’, elements{1}, im_size(2)); % samples
fprintf(fid, ‘%s %i n’, elements{2}, im_size(1)); % lines
fprintf(fid, ‘%s %i n’, elements{3}, im_size(3)); % bands
fprintf(fid, ‘%s %i n’, elements{4}, t); % data type
fprintf(fid, ‘interleave = bsqn’);
fprintf(fid, ‘map info = {%s}n’, coordinate_information.map_info);
fprintf(fid, ‘projection info = {%s}n’, coordinate_information.projection_info);
fprintf(fid, ‘wavelength = {‘);
fprintf(fid, ‘%g, ‘, wavelength_data(1:end-1));
fprintf(fid, ‘%g}n’, wavelength_data(end));
fclose(fid);
I request you to please put above mentioned map_info into this customized enviwrite code. Looking forward for your kind cooperation.
Devendra This is my map_info
MapCellsReference with properties:
XWorldLimits: [699960 809760]
YWorldLimits: [3190200 3300000]
RasterSize: [5490 5490]
RasterInterpretation: ‘cells’
ColumnsStartFrom: ‘north’
RowsStartFrom: ‘west’
CellExtentInWorldX: 20
CellExtentInWorldY: 20
RasterExtentInWorldX: 109800
RasterExtentInWorldY: 109800
XIntrinsicLimits: [0.5 5490.5]
YIntrinsicLimits: [0.5 5490.5]
TransformationType: ‘rectilinear’
CoordinateSystemType: ‘planar’
ProjectedCRS: [1×1 projcrs]
I want to put this information into enviwrite code which is as follows
fprintf(fid, ‘ENVIn’);
fprintf(fid, ‘description = {n’);
fprintf(fid, ‘Exported from MATLAB with coordinate and wavelength info}n’);
fprintf(fid, ‘%s %i n’, elements{1}, im_size(2)); % samples
fprintf(fid, ‘%s %i n’, elements{2}, im_size(1)); % lines
fprintf(fid, ‘%s %i n’, elements{3}, im_size(3)); % bands
fprintf(fid, ‘%s %i n’, elements{4}, t); % data type
fprintf(fid, ‘interleave = bsqn’);
fprintf(fid, ‘map info = {%s}n’, coordinate_information.map_info);
fprintf(fid, ‘projection info = {%s}n’, coordinate_information.projection_info);
fprintf(fid, ‘wavelength = {‘);
fprintf(fid, ‘%g, ‘, wavelength_data(1:end-1));
fprintf(fid, ‘%g}n’, wavelength_data(end));
fclose(fid);
I request you to please put above mentioned map_info into this customized enviwrite code. Looking forward for your kind cooperation.
Devendra how do i put map_info into customized enviwrite ? MATLAB Answers — New Questions