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's gravatar image

jwesroberts
11334
accept rate: 0%


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

permanent link

answered 27 Oct '15, 09:51

Anssi's gravatar image

Anssi ♦♦
51225
accept rate: 11%

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

permanent link

answered 27 Oct '15, 13:02

jwesroberts's gravatar image

jwesroberts
11334
accept rate: 0%

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

permanent link

answered 27 Oct '15, 13:11

Anssi's gravatar image

Anssi ♦♦
51225
accept rate: 11%

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.

permanent link

answered 27 Oct '15, 13:22

jwesroberts's gravatar image

jwesroberts
11334
accept rate: 0%

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

permanent link

answered 29 Oct '15, 09:22

Anssi's gravatar image

Anssi ♦♦
51225
accept rate: 11%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×7

question asked: 26 Oct '15, 14:59

question was seen: 5,837 times

last updated: 29 Oct '15, 09:22