I converted a shapefile into linnet object following some threads on this forum. I did some analysis,Now, I would like to convert this linnet object (linear network) of spatstat R package back to ESRI shapefile format. Could someone give me some hints to achieve this task.
For example, I would generate some random realisation of poisson process on linear network then would like to export the id of the segment and location of the point event on this segments. It seems possible to export this information as textual information but I was wondering if it could "also" be a geographic export (line shapefile of the linnet object and point shapefile of the random realisation)
Thank you.
You can use functions from
maptools
to convert apsp
back to aSpatialLines
object and appp
to aSpatialPoints
. Using the built in datasetchicago
as an example (including the intermediate step of converting alpp
to both apsp
and appp
: