[GRASS-user] Type of data to be used in i.maxlik

Greetings

Before I used i.maxlik I decided to give a look at the code. And I have one question:

  • the input data, I mean the data inside the group, must it be CELL (integers that range 0-255) or can it be DOUBLE (double precision that range whatever)?

I believe that the training_area MUST be integers (for the obvious reason)

Thanks
Kim

Hello

I have sent this message but no one answered me. Can anyone help me on this?
Thanks
Kim

2010/10/15 Kim Besson <kimbesson1981@gmail.com>

Greetings

Before I used i.maxlik I decided to give a look at the code. And I have one question:

  • the input data, I mean the data inside the group, must it be CELL (integers that range 0-255) or can it be DOUBLE (double precision that range whatever)?

I believe that the training_area MUST be integers (for the obvious reason)

Thanks
Kim

On Fri, Oct 15, 2010 at 1:54 PM, Kim Besson <kimbesson1981@gmail.com> wrote:

Greetings
Before I used i.maxlik I decided to give a look at the code. And I have one
question:
- the input data, I mean the data inside the group, must it be CELL
(integers that range 0-255) or can it be DOUBLE (double precision that range
whatever)?

The input can be double but will be read as integer (CELL) since the function
G_open_cell_old() is used [1].

I believe that the training_area MUST be integers (for the obvious reason)

Yes.

Markus

[1] http://grass.osgeo.org/programming6/opencell_8c.html#a1f48562fa8324da9929e8a089f124d2b

Hi Markus

The input can be double but will be read as integer (CELL) since the function
G_open_cell_old() is used [1].

This means what? That pixels with values >255 are all the same? or pixels like 1,034 and 2,043 are rounded?

Thanks
Kim

Hi Markus

The input can be double but will be read as integer (CELL) since the function
G_open_cell_old() is used [1].

This means what? That pixels with values >255 are all the same? or pixels like 1,034 and 2,043 are rounded?

Kim Besson wrote:

The input can be double but will be read as integer (CELL) since the
function
G_open_cell_old() is used [1].

This means what? That pixels with values >255 are all the same?

I think the representable range of CELL is -2,147,483,647 to
2,147,483,647. Anything beyond the range of CELL will be transformed
(by the system, not by GRASS) to fall within the range.

or pixels like 1,034 and 2,043 are rounded?

Truncated, not rounded, e.g.
1.034 -> 1
1.9 -> 1
2.1 -> 2
-1.9 -> -1

Markus M