0

I have two polygons with coordinates [x,y,x,y,x,y,x,y,x,y,x,y], and [m,n,m,n,m,n,m,n,m,n]. For example

poly1 = [4,3,4,5,3,5,3,11,5,11,7,13,10,11,11,11,11,8,9,4,6,4,6,3]

poly2 = [7,13,10,11,10,9,6,9,6,10,5,10,5,11]

The second polygon is located inside the first one like shown in the image.

enter image description here

I have to extract small polygon from large one and get its coordinates in the same format.

can anyone help?

Tassisto
  • 9,877
  • 28
  • 100
  • 157
  • What do you mean by "extract"? Perhaps, "subtract"? And by the way, the green polygon is _not_ inside the red polygon. – DYZ May 20 '22 at 07:31
  • Do you have any code? – Tassisto May 20 '22 at 07:32
  • 1
    Does this answer your question? [How to use Shapely for subtracting two polygons](https://stackoverflow.com/questions/61930060/how-to-use-shapely-for-subtracting-two-polygons) – DYZ May 20 '22 at 07:33
  • presumably you mean `[x1,y1,x2,y2,...xn,yn]` and similarly for the other polygon... – D.L May 20 '22 at 07:43

0 Answers0