Hi everybody, after applying the visible count transform (TileViewshedTilesCountPar) to an image (with a height range from 0 to 143 m) and a point file (with around 200 observers) with a relative Z of 25 m, the resulting image has negative values. This negative values seem to match the visibility area and a closer look to the image shows that you have negative values adjacent to positive ones (for instance there are negative values of -128 side by side with positive values of 127). It seems the absolute value is correct but the negative sign makes this result a strange one. Is this an expected behaviour? (edited: I noticed when the number of observers is significantly reduced (around 100) the resulting image values remain positive. Is there a limitation for the number of observer points?) If needed I can provide a link to the mxb. |

Negative values can be produced by the LevelAll / LevelAny functions, Count should produce non-negative values. Can it be that you left the Result option in the Transform pane at (same field) and the pixel type of the original image was something like INT8? Because then the negative values could be the result of an integer overflow. Set Result to New Field or New Table and set the pixel type to FLOAT64 to counter. If it isn't the above, the MXB would indeed help. |

Hi Adam, thanks for looking into this. The original image is 128x128 FLOAT64 as well as the resulting image, (the result is the same both for a new field or a new table) and the projection used is ETRS89 / Portugal TM06 (EPSG: 3763). Here's the link for the mxb: https://we.tl/t-OqSsFs2JAJ |

Thanks a lot! This is our bug. There is an integer overflow indeed, inside our code. We will fix it. |

Great to be of some help. As this is an ongoing analysis, is the overall visibility calculation correct if I apply TileAbs to find the absolute value of the pixel or is the bug preventing a correct analysis with this number of points? |

No. You can obtain correct results by running the count analysis on portions of 127 or less observers, then summing the outputs. |

Manifold User Community Use Agreement
Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.