Nowosad / geopat2

GeoPAT 2 - a suite of modules dedicated to analysis of large datasets in their entirety using spatial and/or temporal patterns
http://sil.uc.edu/index.php?id=geopat2
GNU Lesser General Public License v3.0
45 stars 8 forks source link

How to avoid "not enough RAM" error on gpat_polygon #20

Closed pierreroudier closed 6 years ago

pierreroudier commented 6 years ago

I'm getting the following error using gpat_polygon on quite a large dataset:

Calculating statistics... OK
Signature length: 55
Calculating extents of polygons...     Not enough RAM to proceed!

Apart from getting more RAM (already running 32 Go RAM on my machine), is there any way to get around this (tiling ?)

Nowosad commented 6 years ago

Hi @pierreroudier, the gpat_polygon uses up to 4GB RAM (4096 MB RAM) as a default. However, you can increase this value with the m flag, for example:

gpat_polygon -i my_input.tif -e my_polys.tif -o my.output.txt -m 16384

The above code increases RAM use to 16GB. Let me know if that's helpful.

pierreroudier commented 6 years ago

@Nowosad Of course, it works, I should have RTFM! Sorry for wasting your time on that one -- closing.