Reputation: 151
I am trying to use a whole city network for a particular analysis which I know is very huge. I have also set it as sparse network.
library(maptools)
library(rgdal)
StreetsUTM=readShapeSpatial("cityIN_UTM")
#plot(StreetsUTM)
library(spatstat)
SS_StreetsUTM =as.psp(StreetsUTM)
SS_linnetUTM = as.linnet(SS_StreetsUTM, sparse=TRUE)
> SS_linnetUTM
Linear network with 321631 vertices and 341610 lines
Enclosing window: rectangle = [422130.9, 456359.7] x [4610458,
4652536] units
> SS_linnetUTM$sparse
[1] TRUE
I have the following problems:
psp
objectlinnet
objectI understand I should try to reduce the network size, but:
parallel
packageR crashes
R crashes when I use the instructions from Spatstat book:
KN <- linearK(spiders, correction="none")
; on my network (linnet) of course
envelope(spiders, linearK, correction="none", nsim=39)
; on my network
I do not think RAM is the problem, I have 16GB RAM and 2.5GhZ Dual core i5 processor on an SSD machine.
Could someone guide me please.
Upvotes: 0
Views: 111
Reputation: 151
I could only resolve this with simplifying my network in QGIS with Douglas-Peucker algorithm in Simplify Geometries tool. So it is a slight compromise on the geometry of the linear network in the shapefile.
Upvotes: 0
Reputation: 1984
Please be more specific about the commands you used.
Did you build the linnet
object from a psp
object using as.linnet.psp
(in which case the connectivity of the network must be guessed, and this can take a long time), or did you have information about the connectivity of the network that you passed to the linnet()
command?
Exactly what commands to "analyse it for a point pattern or envelope" cause a crash, and what kind of crash?
The code for linear networks in spatstat
is research code which is still under development. Faster algorithms for the K-function will be released soon.
Upvotes: 0