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 Answer
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
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.