I’m trying to use DistanceMatrix on GeoPositions. Doing this on large arrays causes the kernel to crash.
Here’s an example, that causes the kernel to crash in about 15 seconds (version 11.2).
largearray=RandomReal[{-180,180},{100000,2}]; largearray[[All,1]]=0.5*largearray[[All,1]]; (*random Lat-Long locations*) DistanceMatrix[GeoPosition[largearray]];
I can get it to succeed with 10,000 locations, but 100,000 causes an almost immediate crash.
It appears to be a memory problem. If I run it with the following code, it aborts.
MemoryContrained[DistanceMatrix[GeoPosition[largearray]];,MemoryAvailable[]/2]
I have 12GB of memory on that CPU, so I have quite a bit to work with. I’m surprised that it fails, its not that much data… Is there a workaround?
Thanks, Jud