|
From: | address@hidden |
Subject: | Re: [igraph] igraph issue with massive matrices |
Date: | Thu, 5 Dec 2019 07:57:43 +0000 |
Hi Tamas, Here is an example of the input data and the output which contains the errors https://dikke.itc.utwente.nl:5001/sharing/556RSAmhE I have a very large transition matrix and I have a shapefile of point location which I want to compute travel time to, with the following code # Required Packages library(raster) library(gdistance) library(rgdal) #filenames T.GC.zone.filename <- “global_4.T.GC target.filename <- “targets.shp” output.filename”<- “output.tif” #read in transition matrix T.GC.zone <- readRDS(T.GC.zone.filename) #read in targetpoints targets <- readOGR(target.filename) #compute accumulated cost from every location to the nearest target output.raster <- accCost(T.GC.zone, targets.zone) #save output writeRaster(output.raster, output.filename, format="GTiff", overwrite=TRUE) The output should be a GeoTIFF with travel time estimates in minutes to the nearest point location and hence every point location should have a travel time of zero, with travel time values increasing with distance/travel from each point.
The snapshot below shows a small part of the output with the points in green, and the travel time raster in shades of gray. I have highlighted travel time raster cells in red when their value is zero. You can see two points where they – for some unknown reason
– have not been used in the travel time computation, but they were part of the dataset and should have been included. In other runs I have cases where the output raster has values of zero when there is no target in that cell. And that is also an error. I have not been able to track down this error, but I am suspecting that this error happens with very large matrices. Unfortunately for my analysis, I really need these large matrices. Thanks!
Andy Nelson Professor, Spatial Agriculture
and Food Security & Head of Department Department of Natural Resources
(Room 4-144) ITC -
Faculty of Geo-Information Science and Earth Observation of the
University of Twente PO Box 217, 7500 AE Enschede, the Netherlands.
Tel: +31 (0) 53 489 3072 Natural Resources Management
Research and
MSc programmes at ITC From: igraph-help <igraph-help-bounces+a.nelson=address@hidden>
On Behalf Of Tamas Nepusz
It's hard to say anything at this stage; it could well be a bug on igraph's side, but the only way I could test it is if I could reproduce it on my side. Is there some small, self-contained example that reproduces the bug and that you could
share with us? All the best, Tamás |
[Prev in Thread] | Current Thread | [Next in Thread] |