1

I'm having a weird problem with grids in QGIS 3.12.2.

I have generated a grid to calculate some zonal statistics, and am using that to display a few different things. All good so far. Nice pretty picture. But then I open up QGIS again to fix something, and it's like the attributes have all been scrambled. so instead of showing this clumpy thing like it should

Map with clumped grid cells in green and yellow

It looks like this scattered mess. It's not just missing 90% of the data, the cells that it's showing are in the wrong spot.

The attribute tables look like this: Everything out of place, numbers going diagonally. It's also showing a "filter" - which might explain some of the gaps, but it is set to show all features so I'm not sure where those are hiding.

enter image description here

Map with grid cells that are scattered in diagonal lines

If I look at the numbers in the attribute fields, they don't make any sense - it's a generated grid so it should have sensible IDs and left/right/top/bottom info, but that's all been scrambled with the statistic values

There's nothing I've actually done or changed in between it displaying correctly and getting all messed up, and I'd really prefer not to build them again from scratch.

I've tried rebooting QGIS, and reloading the shapefiles, but no dice. It has happened in the past and recovered as spontaneously as it happened, but I'd love to know how to fix it myself.

4
  • Which data format are you using? You could try regenerating the spatial index maybe.
    – julien
    Commented Jun 18, 2020 at 13:48
  • Look at the grid projection AND the project projection. It could be that the grid doesn't have a projection, so the coordinates are just "numbers". If the project CRS is the one that should be assigned to the grid, everything looks good. Else, the "numbers" doesn't make any sense and the display becomes artistic (ex: grid should be in UTM but map CRS is unprojected 4326. each grid coordinates is understood as being in degrees - instead of meters -, so several times around the earth and a few more degrees)
    – JGH
    Commented Jun 18, 2020 at 15:10
  • @JGH They're all in the same projection, which matches the project file, and it's the original one it was generated in. It kinda looks like all the attributes have been moved around. Also I noticed in the attribute table it's saying it's "filtered", so many my missing cells are somewhere.
    – Liv_2020
    Commented Jun 18, 2020 at 18:03
  • For the filtering, it could be on the layer itself (a filter icon would be displayed next to the layer name in the table of content).
    – JGH
    Commented Jun 18, 2020 at 18:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.