Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 16685

On a map, a closed shape defined by a connected sequence of x,y coordinate pairs, where the first and last coordinate pair are the same and all other pairs are unique.

2 votes
3 answers
2k views

Joining nearest neighbor small polygons using R

The figure shows a plot of numerous polygons (zoom in) made from a raster file by require(sp) require(raster) pol100 <- rasterToPolygons(r, fun=function(x){x==1}, dissolve=FALSE) There polygon has 2059 … plot(pol100[[1]][[500]]) #if want to know the area of a particular polygon (say polygon#100) #(all polygons are in fact of same size) pol100@polygons[[100]]@area I want to know if there is any automated …
ToNoY's user avatar
  • 573
4 votes

How to split a polygon using R

Say your polygon is made up of the following points: HL <- matrix(c(1,1,2,3,3,2,1, 1,2,4,2,1,0,1), ncol=2, byrow=FALSE) At first, you have to make a spatial line with these points require(rgdal) require … as spatial line objects, getting the intersection points between those is easy require(rgeos) intrsct <-gIntersection(Sll, SL) #plot the polygon line plot(SL, axes=TRUE) #plot grid lines plot(Sll, lty …
ToNoY's user avatar
  • 573
9 votes
2 answers
8k views

How to split a polygon using R

I have an irregular polygon which is a spatial object. I want to divide it into multiple polygons (say, n=25) with equal height. …
ToNoY's user avatar
  • 573