Skip to content
Prev 610 / 29559 Next

The length of common boundaries

On Tue, 11 Oct 2005, Yilin Liu wrote:

            
The short answer is no. The R polygon objects do not have topology. 

The longer answer is that if you have e00 or ArcInfo binary vector layers,
then the polygons are built from lists of directed arcs, and the arcs have
lengths. So if your input data are in this format, it is feasible but is 
not implemented.

It looks as though the GRASS6 vector format also provides similar
information. But topology is a GIS thing rather than an R thing, so no
solution within R is available.

If you use GRASS, it would be possible to look at how this might be done
(read a shapefile into GRASS, output an ASCII dump of the arcs, which
polygons they separate, and how long they are, and do something with this,
not losing trace of which polygon(s)  belong to which observation - this
was where progress stopped the last time I looked). Arc lengths would be
nice for cartograms too.

Roger