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
-
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 pluginIan Turton– Ian Turton2021年01月02日 10:57:39 +00:00Commented Jan 2, 2021 at 10:57
-
Thanks for answering. I added some Info. What else YOu need? Greetingsbluesharxx– bluesharxx2021年01月02日 13:10:46 +00:00Commented Jan 2, 2021 at 13:10
1 Answer 1
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.
-
Thanks man! Im new to this... So how do i select a smaller area....?bluesharxx– bluesharxx2021年01月02日 17:28:05 +00:00Commented Jan 2, 2021 at 17:28
-
use the
select tool
andexport
the polygons to a new files - see docs.qgis.org/3.16/en/docsIan Turton– Ian Turton2021年01月02日 17:29:53 +00:00Commented Jan 2, 2021 at 17:29