Thursday, 4 August 2016

Removing intersect of one polygon from another using R?


I am trying to remove the intersect from Poly2 onto Poly1. Below are the coords of the 2 polygons.


> coords1
[,1] [,2]
[1,] 992.0161 7462.531
[2,] 950.1962 7413.532
[3,] 902.3632 7421.207
[4,] 706.1985 7472.378
[5,] 654.0139 7711.760

[6,] 657.5960 7726.950
[7,] 786.2667 7844.380
[8,] 789.5935 7842.925
[9,] 981.7046 7498.659
[10,] 983.4246 7493.271
[11,] 990.6680 7469.888
[12,] 992.0161 7462.531
> coords2
[,1] [,2]
[1,] 930.3464 7607.313

[2,] 979.3528 7502.470
[3,] 865.8662 7484.337
[4,] 850.5665 7594.947
[5,] 930.3464 7607.313

Poly1<-Polygon(coords1)
Poly2<-Polygon(coords2)

The 2 polygons looks like thisenter image description here What I would like to get at the end is the dark blue polygon (Poly1) without the light blue (Poly2) area i.e., new eastern coordinates.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...