Create point feature at line intersection and split lines

I have a shapefile that shows all the roads in Germany. Hereby, I want to create a point at each intersection of lines. Based on this created point, I can split the line into separate line features. Due to high computational power, I created a test shapefile that shows a single-line feature and is characterized by an intersection. The test shapefile is created via ArcGIS Pro. The original shapefile can be obtained via: [Download Free Germany ArcGIS Shapefile Map Layers] ("Germany Roads"). The test shapefile is imported in a simple R-script and visualized:

#necessary libraries

#import data
intersection <- readOGR('C:/Test/Intersection.shp')

#examine dataset

#visualize dataset (via tmap)
tm_shape(intersection) +
  tm_lines(col = "red")
  tm_legend(legend.outside = "TRUE")

The intersection consists of two lines (as one feature) crossing each other.

I have two questions regarding the intersection:

I. How can I create a point feature at the intersection of the line feature?

II. How can I split the single line feature into four different line features? I know that the "Split Line at Point" function is available in ArcGIS Pro, however, I do not know how to translate this function to the context of R.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.