[R-sig-Geo] shared boundary lengths ?
Toby.Patterson at csiro.au
Toby.Patterson at csiro.au
Mon Jul 26 07:16:38 CEST 2010
Hi,
Apologies up front if this has been covered somewhere already --
I have seen some discussion of a similar problem on the list, but it doesn't quite seem to cover what I'm after.
Also I'm new to the spatial side of R, so I might not quite use the correct lingo!
My problem is this:
For a set of polygons (a SpatialPolygonsDataFrame) with shared boundaries
(i.e. with no overlapping regions or gaps between them), I need to know the length of shared adjacent boundaries. Note, in this case all polygons will have a boundary shared with at least one other polygon.
So I'm after a square symmetric matrix with diagonals zero. The i,j th entry would then be the length (in some appropriate coordinate system) of the boundary between polygon i and j.
Also - I'm not sure if sufficient information is stored in the SpatialPolygonsDataFrame class actually allow these shared lengths to be calculated. I'm sure someone can quickly clear that up for me. Possibly this can only be done in GIS systems?
Any help would be much appreciated as this it seems quite a fiddly one to write myself.
Thanks,
Toby
More information about the R-sig-Geo
mailing list