How to use a shapefile to extract regions outside the shapefile?

조회 수: 4 (최근 30일)
Raka Mukherjee
Raka Mukherjee 2020년 1월 10일
댓글: KSSV 2020년 1월 20일
Can anyone help me in extracting only the regions outside a shapefile? I have gone through many documentation and answers in matlab central but did not find a solution to this.

답변 (1개)

KSSV
KSSV 2020년 1월 10일
  1. Read the shape file using shaperead. This has single/ multiple regions.
  2. Pick one closed region fromt he shape file
  3. Take the grid and shapefile region, use inpolygon to get the points lying outside and inside the closed region .
  4. With the help of indices get what you want.
  댓글 수: 2
KSSV
KSSV 2020년 1월 20일
Raka Mukherjee comented:
Thank you for your answer but I wanted to use one particular world shapefile to extract the outside part of the shapefile for any image, so the closed region cannot be constant. Is that possible?
KSSV
KSSV 2020년 1월 20일
Yes very much possible. Give a try and if you get problem, get back here.

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

Community Treasure Hunt

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

Start Hunting!

Translated by