how to clip geotiff image ?

4 次查看(过去 30 天)
Reema Alhassan
Reema Alhassan 2018-6-28
hello everyone
I have a geotiff image and 4 coordinates xmin, xmax, ymin,ymax (the boundingBox of a shape file) I need to clip it with these coordinates and make a new geotiff image does anyone now how to do this pleas? I have tried a lot of ways and nothing works..
Thank you

回答(1 个)

Sean Turner
Sean Turner 2018-10-23
Did you ever figure this out? I am having the same problem.
  1 个评论
Reema Alhassan
Reema Alhassan 2018-10-23
Yes i have done this to clip the image based on the shape file coordinates
the steps to that are:
1-try to the geoimread() function you can find it below enter the x and y coordinates as inputs( the x and y of the shapefile for example if you have it) geoimread(x1,y1) the output of this function is [xe,ye,values,..] so it will clip the image based on the bounding box of the shape file
2-after that try to use inpolygon(xe,ye,x1,y1) to clip the image based on the shape coordinates if it takes to much time try to search for another function which do the same job in the file exchange
geoimread: https://www.mathworks.com/matlabcentral/fileexchange/46904-geoimread
inpolygon : https://www.mathworks.com/help/matlab/ref/inpolygon.html

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by