Having a polygon shape file, I need to create a polyline shape file containing only the common borders between the polygons (see image).
My question is similar to 1 and 2 , only I need to do this in R. The last such question relates to the solution using the package Shapelyfor python. The analogue Shapelyfor Ris rgeos. Although I could not find a solution with rgeosmyself.
R
Shapely
python
rgeos
Note: The shapefile with the borders used for illustration was created in ArcGIS using the solution from the same question 1. Now I need to do the same in R.
, , , . rgeos gUnaryUnion , gDifference .
gUnaryUnion
gDifference
eusub
library(rgeos); library(sp) borders = gDifference( as(eusub,"SpatialLines"), as(gUnaryUnion(eusub),"SpatialLines"), byid=TRUE)
, .
. :
plot(eusub) plot(borders, col="red",lwd=2,add=TRUE)
Source: https://habr.com/ru/post/1690579/More articles:The object is still in the inactive version - sapGoogle Cloud Platform App Engine Node Flexible Ruby Instance sitting using 50% RAM - google-app-engineКак вызвать родительский метод и передать любой дочерний элемент, который расширяет родительскую структуру как аргумент в Голанге - compositionr gis: identify internal boundaries between polygons with sf - rCreate a domain with matrices in the Chapel - matrixsynchronization of MS DB and CouchDB, CouchDB and PouchDb in C # - c #VBA - The most efficient method for filtering a collection / dictionary of user-defined classes by attribute - collectionshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1690582/apply-changes-to-web-app-manifest-on-an-installed-pwa&usg=ALkJrhgvQPMnwNxpQi08h-6SJK86vXZkTQhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1690583/update-to-angular-5-throws-version-of-angularcompiler-cli-needs-to-be-231-or-greater-current-version-is-510&usg=ALkJrhiys4cphZnAt6I0cRTpCeJ6l5JhFghttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1690584/angular-upgrading-to-version-5-error-version-of-angularcompiler-cli-needs-to-be-231-or-greater-current-version-is-500&usg=ALkJrhjEcVCegqjl4faCGXkvP8QH0SGy9AAll Articles