Thanks Melanie,

That is a great, workable solution. Thank you...I'll try that!

Tina
On Jul 8, 2016 4:59 PM, "Bacou, Melanie" <m...@mbacou.com> wrote:

> Seems the simplest might be to use the circle that contains your points'
> bounding box (same center as the bbox and with a diameter equal to its
> diagonal?
> Spatial circles may be defined as SpatialPolygonsDataFrame using
> sampSurf::spCircle().
> https://cran.r-project.org/web/packages/sampSurf/sampSurf.pdf
> --Mel.
>
>
> On 7/8/2016 10:31 AM, Tina Cormier wrote:
>
>> Hi all,
>>
>> Looking for help aggregating some field data subplots to the plot level
>> (data currently in shapefile format). I have clusters of 4 points (4
>> subplots = 1 plot). I'd like to create a circle around each cluster that
>> is
>> the smallest circle that would encompass all 4 points. Sort of like a
>> convex hull, but a circle (convex hull, in this case, would give me a
>> triangle because of the layout of the subplots). I am familiar with (and
>> use frequently) the typical geo packages in R - with rgdal, sp, raster,
>> and
>> maptools being my most frequent flyers. Is there a function I'm missing in
>> these (or some other) packages that might be able to help me out? In the
>> attribute table, I have a unique ID for each plot/cluster. So for each
>> plot
>> ID (in this case, consisting of 4 subplots), I'd like to build a circle
>> around all of the subplots.
>>
>> str(pts)
>>>
>> Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
>>    ..@ data       :'data.frame': 160 obs. of  12 variables:
>>    .. ..$ Plot      : num [1:160] 1 1 1 1 2 2 2 2 3 3 ...
>>    .. ..$ Subplot   : num [1:160] 1 2 3 4 1 2 3 4 1 2 ...
>>
>> I should also mention that it's not always 4 points (subplots), and they
>> aren't always covering the same size area on the ground, so buffering by a
>> constant distance isn't the answer. I have subset out 3 plots (so 12
>> subplots) into a test file here:
>> https://dl.dropboxusercontent.com/u/72421241/test_subplotsToPlots.zip
>>
>> I have R version 3.3.0. I know it's customary to include code for what
>> I've
>> tried, buuuut, that would be a blank canvas at this point. Googling hasn't
>> really been fruitful for this issue, so I thought you folks might have
>> some
>> good ideas!
>>
>> Thanks,
>> Tina
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to