1

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.

Edit:

Input: 100m x100m Counted grid layer
Count042019
C:\Users\\Project2019\Count042019.shp
ESRI Shapefile
UTF-8
Polygon (MultiPolygon)
EPSG:27700 - OSGB 1936 / British National Grid - Projected
271837.0204270040267147,91050.0220603790367022 : 629637.0204270039685071,564450.0220603790367022
meters
Feature Count 16,938,252

Hotspot analysis Plugin Paramaters:

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

Error:

2021年01月01日T21: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__
 self.do_weights()
 File "C:\Users\Luki\AppData\Roaming\Python\Python37\site-packages\pysal\weights\_contW_binning.py", line 205, in do_weights
 columns[j].add(i)
MemoryError
Kadir Şahbaz
78.6k57 gold badges260 silver badges407 bronze badges
asked Jan 1, 2021 at 20:32
2
  • 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 Commented Jan 2, 2021 at 10:57
  • Thanks for answering. I added some Info. What else YOu need? Greetings Commented Jan 2, 2021 at 13:10

1 Answer 1

0

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.

answered Jan 2, 2021 at 17:25
2
  • Thanks man! Im new to this... So how do i select a smaller area....? Commented Jan 2, 2021 at 17:28
  • use the select tool and export the polygons to a new files - see docs.qgis.org/3.16/en/docs Commented Jan 2, 2021 at 17:29

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.