zoran-cuckovic / QGIS-visibility-analysis

Quantum GIS plugin for visibility analysis
GNU General Public License v3.0
72 stars 17 forks source link

Binary viewshed: Invalid and variable results (All 0 Values, no 1 values) #45

Closed archaeolithics85 closed 6 months ago

archaeolithics85 commented 4 years ago

I am trying to generate viewsheds for a set of archaeolocigal sites in the Levant. However results are varying depending on the raster resolution (25 m & 100 m) and the raster type (float32 and int16)

The original raster data is the aster 3 dataset from the NASA Geoviewer.

Observer height was set to 1.7 m and target height of 1.1 at a max distance of 1400m. I tried to process the binary viewshed. The dataset contains 52 locations which I have tried to iterate through them, but in several cases the result is a circle of 0-values even though there should be visbility > 0. However, when I change the raster-resolution or the data-type, results may vary, but generally are wrong, still.

I hope you can help me. And general thanks for providing this fine software.

image

image

zoran-cuckovic commented 4 years ago

Hello, An all zero raster is not a valid result - at least the centre pixel(s) should be marked as visible. Perhaps you have a projection issue: it seems that your points don't sit inside the perimeter of the viewshed ? Switch off the automatic re-projection in QGIS ("no projection") and see what happens. For visibility modelling, 100 metres raster is probably too coarse (unless you analyse very large areas).

archaeolithics85 commented 4 years ago

Thanks for the swift answer. No, all rasters are in the same CRC, the issue prevails both with projection on and off. Points are located correctly (In the images shown above, the viewshed-layer is placed above the point layer). I tested both the original aster3 raster and the resampled 100 m raster, both generate the same issue.

Until now I was able to narrow the issue down to the merging process of the aster3 tiles to a larger raster dataset. When the raster is merged (Keeping all properties the same) the issue happens. When I use the single tiles and just reproject them from WGS84 to EPSG 23036 the problems appear. I also have tried merging via GDAL, GRASS and SAGA which all resulted in the same issue.

As you have written, visibility should at least be positive for the central cell. But it isn't... unfortunately.

image

archaeolithics85 commented 4 years ago

I am still trying to solve this issue. I have now narrowed down the issue to this case:

Datasets in use DEM based on ASTER3 Dataset (30 m reprojected to EPSG 32636) Point Dataset with archaeological sites (EPSG 32636)

When a selection of points from the Point dataset is processed without iteration it seems to work:

image

When the same selection is iterated (All other properties remain the same) it does not work:

image

When single point from Dataset is selected and processed without iteration it does not work:

image

The plugin seems to be massively erratic in this case. I also have tested other projection systems and QGIS 3.4 as well as 3.10.

archaeolithics85 commented 4 years ago

So, ok. The issue only appears when features are iterated or selected manually. I also checked completely other datasets. This thing here does not work properly...

zoran-cuckovic commented 6 months ago

I'm closing this potential issue, as so far it hasn't been raised again. There can be many reasons for such bizzare behaviour, it remains unclear...