3

I am struggling with the correct hstore_to_map syntax. I extracted power plants from OSM. In the "other tags" field are coal, hydro, solar stated as sources. How do I get/display just the coal power plants ? I use QGIS 3.22 LTR.

1
  • I just found explode Hstore field in the toolbox of QGIS. This works too, extracts the tags into the corresponding fields. But it would be still helpfull to know how to select from a Hstore field without exploding it.
    – BAE_23
    Commented Aug 13, 2022 at 14:05

1 Answer 1

7

You can use this expression in "Select Features by Expression (Ctrl+F3)" to select coal power plants.

map_get(
  hstore_to_map(other_tags),
  'plant:source') = 'coal'    -- change 'plant:source' and 'coal' if necessary
0

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.