Re: [R-sig-Geo] creating polygons of clusters of points?

2010-04-25 Thread Hans Ekbrand
Dylan Beaudette wrote: > Hi, > > Here is another approach, using something like a 'concave hull' -- i.e. alpha > shapes: > > http://casoilresource.lawr.ucdavis.edu/drupal/node/919 > Thanks Dylan and thanks Roman for your advice. (convexhull.xy was what I wanted). signature.asc Description: O

Re: [R-sig-Geo] creating polygons of clusters of points?

2010-04-23 Thread Dylan Beaudette
Hi, Here is another approach, using something like a 'concave hull' -- i.e. alpha shapes: http://casoilresource.lawr.ucdavis.edu/drupal/node/919 Cheers, Dylan On Friday 23 April 2010, Roman Luštrik wrote: > How does this function sound (convexhull.xy {spatstat})? > > http://bm2.genes.nig.ac.jp

Re: [R-sig-Geo] creating polygons of clusters of points?

2010-04-23 Thread Roman Luštrik
How does this function sound (convexhull.xy {spatstat})? http://bm2.genes.nig.ac.jp/RGM2/R_current/library/spatstat/man/convexhull.xy.html Convex Hull of Points Description Computes the convex hull of a set of points in two dimensions. Usage convexhull.xy(x, y=NULL) Arguments x vector of x coo

[R-sig-Geo] creating polygons of clusters of points?

2010-04-23 Thread Hans Ekbrand
How to create nice polygons from a number of clusters? I have sorted list of clusters representing hot-spots > sorted.list.of.clusters [1] 7 1 11 9 26 2 5 10 33 40 18 28 37 20 30 47 53 whereas my.cluster holds the classification of events (criminal fire-setting) to clusters: head(my.clust

Re: [R-sig-Geo] creating polygons

2009-04-23 Thread Roger Bivand
On Thu, 23 Apr 2009, Alina Sheyman wrote: I went back to the help page, but it still didn't clarify it for me. Yes, the two files are different length, but both have a zip variable that they can match on and then keep only those records that match. Or do I need to additionally create an index fo

Re: [R-sig-Geo] creating polygons

2009-04-23 Thread Alina Sheyman
I went back to the help page, but it still didn't clarify it for me. Yes, the two files are different length, but both have a zip variable that they can match on and then keep only those records that match. Or do I need to additionally create an index for the match to occur? I am understanding it t

Re: [R-sig-Geo] creating polygons

2009-04-21 Thread Zev Ross
Hi Alina, It sounds like you want to dissolve the zips based on their membership in a district. If I have that right, then try the function unionSpatialPolygons. The example from the help is below. Zev library(sp) library(gpclib) nc1 <- readShapePoly(system.file("shapes/sids.shp", package="mapt

Re: [R-sig-Geo] creating polygons

2009-04-21 Thread Roger Bivand
On Tue, 21 Apr 2009, Alina Sheyman wrote: To rephrase my question and explain my problem further I have already created a map for revenue by zip code, in the state of Massachusetts. To accomplish that I used a shapefile for Massachusetts and a dataframe with my revenue/zip codes. What I am tryi

Re: [R-sig-Geo] creating polygons

2009-04-21 Thread Alina Sheyman
To rephrase my question and explain my problem further I have already created a map for revenue by zip code, in the state of Massachusetts. To accomplish that I used a shapefile for Massachusetts and a dataframe with my revenue/zip codes. What I am trying to do now is to have the same map done not

Re: [R-sig-Geo] creating polygons

2009-04-20 Thread Don MacQueen
This is a pretty general question, and there are potentially many ways to do it. One way to get started would be to follow the example(s) in the help page for the overlay() function in the sp package. -Don At 1:26 PM -0400 4/20/09, Alina Sheyman wrote: I have a list of made-up districts an

[R-sig-Geo] creating polygons

2009-04-20 Thread Alina Sheyman
I have a list of made-up districts and corresponding zip codes. Based on that I want to define my own polygons (for each district) and then use them to create a map. Does anyone know how I would go about defining these? thank you [[alternative HTML version deleted]]