1

I have a shapefile of a lot of polygons. I calculated perimeter of each polygon and some polygons returned nan values as they have hole/ring. I am looking for a way to select the polygons with 'nan' value in QGIS. "column_name" = 'nan' seems to be an invalid expression in QGIS.

How do I select them?

6
  • 3
    Select the ones greater than 0 and invert selection? NaN is not a number so shouldn't be greater than 0 (or less than or equal to). Commented Apr 4, 2019 at 5:50
  • This worked, thank you so much!
    – Sher
    Commented Apr 4, 2019 at 5:55
  • 4
    having a hole should not break the perimeter calculation, more likely those polygons are invalid
    – Ian Turton
    Commented Apr 4, 2019 at 7:25
  • Thanks Ian, you are right. Actually these polygons have been converted from raster image. I simplified the polygons, so there is no nan values anymore.
    – Sher
    Commented Apr 4, 2019 at 7:33
  • better than simplifie, may be the processing called "Fix" Commented Apr 4, 2019 at 9:51

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.