I need to read the OSM map into R and convert it to spatstat linnet class.
In the process, I need to simplify the graph so that no edge is shorter
than several meters. At the same time, the network graph topology must
remain the same, i.e. the crossroads must be kept as they are.
So far, I've proceeded this way: 1) I use the map packed by geofabric.de,
2) I read it with sf::st_read(), 3) transform its CRS to Krovak projection
with st_transform(), and 4) simplify it with
1. Does st_simplify() the work, i.e. does it keep the crossroads?
2. Is st_union() in front of it necessary?
3. Isn't there a better way? st_simplify() still leaves some very short
(about 1 mm long) edges in the graph. (If necessary, crossroads, i.e.
vertices with more than two edges, can be moved and joined if they are
close to each other and connected with an edge, since all such vertices
closer than several meters may represent a bug in the map anyway. At least,
I guess so.)
One extra question: I going through geofabric.de, sf, sp, and
Many thanks for your kind help.
*Ing. Michal Kvasnička, Ph.D.*
*Masaryk University | School of Economics and Administration*
Department of Economics
A: Lipová 41a | 602 00 Brno
E: [hidden email] | W: www.econ.muni.cz/~qasar