OSM Data from Geofabrik and filter --keep='power=*'

Hello,

I am completely new to the use of OSM data.
I want to extract OSM data regarding power related information, e.g. regarding transmission lines. So I downloaded the osm.pbf file for whole Europe from geofabrik.de, used the osmconvert in order to recieve an o5m format and then used the osmfilter with following command --keep=‘power=*’. Unluckily, I then recieved an o5m file, which is 0KB. Can anyone give me advice, how to proceed, so that I can filter the osm file from geofabrik.de regarding power related information? Obviously my filter did not work, as I recieved an “empty” file (0KB).

Thank you for your help. Either English or German anwers would help me.

I think the syntax is

--keep=power=*

(no quotes). I suggest to try this with a small extract first.

Thank you for the response. With that syntax I get at least a file with content, so > 0KB. Thats progress :slight_smile:

I did it just for Belgium now. But even though I used the filter for power related information, I still recieve a database (when I visulize it with pgAdmin) with columns for e.g. adresses etc. Why are there still these columns that are not related to power?

And is here someone who knows more about power related information? Because even with that filter I cannot find relevant data on transmission lines for example. I cannot find them, inlcuding their lenght and voltage… And shouldnt I be able to find different power plants and at which point they feed in into the network?

Thank you for your help!

I am sure there are power experts in the German forum. The filter means keep objects with a power tag, it doesn’t mean that all other tags are removed. So, you’ll find things like this
https://www.openstreetmap.org/way/24493551

A couple of things:

  • you can drop unneeded tags with osmfilter (but care may be needed)
  • you can create a separate xxx.style file (https://github.com/openstreetmap/osm2pgsql/blob/master/default.style) for osm2pgsql which only uses the columns in which you are interested. It’s a while since I did this, so you may also need separate DDL for the tables. You can always add extra tag values by using the hstore option.

Looks like you’ve been asking the exact same question here: https://forum.openstreetmap.org/viewtopic.php?id=72175