ptsinnt.view {shp2graph} | R Documentation |
A specific function to visualizethe integration between a point data set and spatila
network, i.e. results returned by the function points2network
ptsinnt.view(ntdata, nodelist, pointsxy, CoorespondIDs, VElist=NULL)
ntdata |
A “SpatialLinesDataFrame” or “SpatialLines” object |
nodelist |
A “nodelist” object |
pointsxy |
A two-column matrix of point coordinates (X, Y) |
CoorespondIDs |
A vector of the cooresponding node ID for each point in “pointsxy” |
VElist |
A list of virtual edges if added, i.e. approaches 3 and 4 are used |
Binbin Lu lubinbin220@gmail.com
data(ORN) #pts<-spsample(ORN.nt, 100, type="random") #ptsxy<-coordinates(pts)[,1:2] #ptsxy<-cbind(ptsxy[,1]+0.008,ptsxy[,2]+0.008) #Mapping each point to the nearest node in the network/graph #res<-points2network(ntdata=ORN.nt,pointsxy=ptsxy, mapping.method=1) #Visualize the results without virtual edges #ptsinnt.view(ntdata=ORN.nt, nodelist=res[[1]], pointsxy=ptsxy, # CoorespondIDs=res[[3]]) #Visualize the results with virtual edges #res<-points2network(ntdata=ORN.nt,pointsxy=ptsxy, mapping.method=3, # ea.prop=rep(0,37)) #VElist<-res[[7]] #ptsinnt.view(ntdata=ORN.nt, nodelist=res[[1]], pointsxy=ptsxy, # CoorespondIDs=res[[3]], VElist=VElist)