I was able to get my desired result (scale from [0 8]) by changing one the lines to set(gca, 'yticklabel', [0, ticks/10]); and then running the program with the limit 80.
05 Jul 2011
geotiffwrite
Write a 2D or 3D array to a single or multi-band GeoTIFF file
Author: Jimmy Shen
great program. If the Model Type is not geographic, it clears the bbox variable ? My model type is "projected". So what should happen there? Thanks Matt
In order to make this code fully support the ModelTransformationTag the following changes are necessary:
line 873: comment out
error('ModelPixelScale is required...');
as this isn't necessarily a true statement and will cause problems when trying to use only the ModelTransformationTag.
line 1213 - 1214:
fwrite(fid, gifd.ModelPixelScaleTag,'double'); and
fwrite(fid, gifd.ModelTiePointTag, 'double');
should be surrounded by
if isfield(gifd,'Model...Tag')
end
statements for when these tags are not being used as is the case with ModelTransformationTag.
Finally, add in the code that actually writes the ModelTransformationTag portion (previously missing). Mine looks like this:
if isfield(gifd,'ModelPixelScaleTag')
fwrite(fid,gifd.ModelPixelScaleTag,'double');
end
if isfield(gifd,'ModelTiePointTag')
fwrite(fid,gifd.ModelTiePointTag,'double');
end
if isfield(gifd,'ModelTransformationTag')
fwrite(fid,gifd.ModelTransformationTag,'double')
end
That being said, great work Jimmy getting this put together and thank you for your efforts.
4
27 Apr 2012
geotiffwrite
Write a 2D or 3D array to a single or multi-band GeoTIFF file
You need to use MATLAB's geotiffread to read L7 file into matrix, with all attributes. Then find out the index of your sub-region, and assign the sub-region to a new matrix. You can now use the make_option option in my package to select optional fields. However, you need to match the attributes that you read, and select the correct fields by yourself in order to create the optional fields to be used in my geotiffwrite. Since I don't have Mapping toolbox, I am afraid that I cannot provide you with more details.
Comment only
26 Apr 2012
geotiffwrite
Write a 2D or 3D array to a single or multi-band GeoTIFF file
thank you for your response... i'm trying to select a region of a Landsat 7 geotiff image and then to save it with all its atributes. Please, how can I select the rectangular window?
Comment only
26 Apr 2012
geotiffwrite
Write a 2D or 3D array to a single or multi-band GeoTIFF file
My geotiffwrite can only write a rectangular dataset into the file. As long as your sub-region is a rectangular dataset, you should be able to write it into a separate file.
Comment only