I try to create an Hotspot crime map of Greater London. I created grid, counted points layers. When I try to use Hotspot analysis plugin after a while my memory spikes like crazy (16gigs) and this error appears.

I use British National Grid OSGB1936.


Input: 100m x100m Counted grid layer
ESRI Shapefile

Polygon (MultiPolygon)
EPSG:27700 - OSGB 1936 / British National Grid - Projected
271837.0204270040267147,91050.0220603790367022 : 629637.0204270039685071,564450.0220603790367022
Feature Count 16,938,252

Hotspot analysis Plugin Paramaters:

Local Getis-Ord Gi*
Input Layer: 100m x100m Counted Grid Layer
Attribute Field: NUMPOINTS 


2021-01-01T21:17:50     WARNING    Traceback (most recent call last):
  File "C:/Users/Luki/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 613, in run
  w = pysal.queen_from_shapefile(layerName.split("|")[0])
  File "C:\Users\Luki\AppData\Roaming\Python\Python37\site-packages\pysal\weights\user.py", line 67, in queen_from_shapefile
  w = Queen.from_shapefile(shapefile, idVariable=idVariable)
  File "C:\Users\Luki\AppData\Roaming\Python\Python37\site-packages\pysal\weights\Contiguity.py", line 255, in from_shapefile
  w = cls(iterable, ids=ids, id_order=id_order, **kwargs)
  File "C:\Users\Luki\AppData\Roaming\Python\Python37\site-packages\pysal\weights\Contiguity.py", line 199, in __init__
  criterion=criterion, method=method)
  File "C:\Users\Luki\AppData\Roaming\Python\Python37\site-packages\pysal\weights\Contiguity.py", line 383, in _build
  neighbor_data = ContiguityWeightsPolygons(polygons, wttype=wttype).w
  File "C:\Users\Luki\AppData\Roaming\Python\Python37\site-packages\pysal\weights\_contW_binning.py", line 135, in __init__
  File "C:\Users\Luki\AppData\Roaming\Python\Python37\site-packages\pysal\weights\_contW_binning.py", line 205, in do_weights
  • Can you add some more details using the edit button - we need some more information about your input files and the parameters you use when running the plugin
    – Ian Turton
    Jan 2 at 10:57
  • Thanks for answering. I added some Info. What else YOu need? Greetings
    – bluesharxx
    Jan 2 at 13:10

Your input data set has nearly 17 Million features and stretches from Exeter to Newcastle upon Tyne. This is probably why the hotspot analysis plugin runs out of memory (unless you have many many gigabytes of memory).

I would select a much smaller area to analyse.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.