how to clip geotiff image ?

조회 수: 8 (최근 30일)
Reema Alhassan
Reema Alhassan 2018년 6월 28일
댓글: Hasan Hasanuzzaman 2020년 7월 22일
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
Hasan Hasanuzzaman
Hasan Hasanuzzaman 2020년 7월 22일
How have you got bounding box of the shapefile

댓글을 달려면 로그인하십시오.

답변 (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