Dear Colleagues, I am trying to use the oft-countpix.pl application to count pixel in a *.tif raster. The raster is 24MB in size and I am running the command within a virtual machine (ubuntu 14.04) hosted on a windows 7 machine. The raster of interest is created using the gdal_calc.py function and represents a land cover class. To reduce the size of the output from gdal_calc.py I have used LZW compression. The command used is oft-countpix.pl temp.tif 1 After a couple of minutes I receive the following error: wesley@wesley-VirtualBox:~/rasterData$ oft-countpix.pl temp.tif 1 Segmentation fault (core dumped) cat: /tmp/histtempZ4g/temp_hist.txt: No such file or directory Any help on the matter would be greatly appreciated. Wesley asked 26 Oct '15, 14:59 jwesroberts |
Dear Wesley, oft-countpix.pl calls oft-his which seems to crash for some reason. Can you try to produce the histogram running oft-his from the command line? AP answered 27 Oct '15, 09:51 Anssi ♦♦ |
Dear AP, oft-his also returns a Segmentation fault. This time however the Segmentation fault is preceded by a message indicating "Memory allocation problem...will use an alternative method". The file I am testing the application on is 24MB. The virtual machine I am using has only 2GB of memory. Could this be the problem? Regards, Wesley answered 27 Oct '15, 13:02 jwesroberts |
Thanks Wesley, yes that's probably the reason. However, oft-his should never crash. Can you run of-mm and let us know the reported min and max values as well as the maxval parameter you've used (if any), please. Best, AP answered 27 Oct '15, 13:11 Anssi ♦♦ |
Hi AP, oft-mm returns Band 1 min = 0.000000 Band 2 max = 1.000000 The temp.tif file does contain nan's if that makes a difference. Regards, W. answered 27 Oct '15, 13:22 jwesroberts |
Thanks Wesley, seems that the problem was with the initialization of the allocate (large) array. I have fixed that now and will release a new installer as soon as we've finalized the testing of the new version. Many thanks for reporting! AP answered 29 Oct '15, 09:22 Anssi ♦♦ |