MATLAB: Trimimg a geotiff by a shapefile

geotiff trim mapping toolbox shapefileMapping Toolbox

Hi,
I am new to mapping toolbox and here the thing I need help: I have a large geotiff file and I like to extract a small area of it (still in a geotiff format) based on a shape file I have access to (I tried 'maptrims' but it requires the 'RasterInterpretation' field of the 'spatial referencing object' to be 'cells' which in my case it is 'postings'). Any idea on how can I achieve this?
Thanks,

Best Answer

You can use geoimread to read only the data surrounding your shapefile. Get the xdata and ydata from the shapefile, then use those coordinates with geoimread.