I want to import into PostGIS the whole planet but I am interested for certain tags. Specifically I am not interested in nodes, ways and areas which are related with the land. Below is a small part from the openstreemap-carto.style

# OsmType  Tag          DataType     Flags
node,way   access       text         linear
node,way   addr:housename      text  linear
node,way   addr:housenumber    text  linear
node,way   addr:interpolation  text  linear
node,way   admin_level  text         linear
node,way   aerialway    text         linear
node,way   aeroway      text         polygon
node,way   amenity      text         polygon
node,way   area         text         # hard coded support for area=1/yes =>      polygon is in osm2pgsql
node,way   barrier      text         linear
node,way   bicycle      text
node,way   brand        text         linear
node,way   bridge       text         linear
node,way   boundary     text         linear
node,way   building     text         polygon

After that there is some information regarding the flag delete

 # Deleted tags
 # These are tags that are generally regarded as useless for most rendering.
 # Most of them are from imports or intended as internal information for mappers
 # Some of them are automatically deleted by editors.
 # If you want some of them, perhaps for a debugging layer, just delete the lines.

My question: If I use the flag delete for some nodes, does it mean that these nodes (or ways) will be completely discarded resulting in a smaller database? Do I also need less space during importing planet in PostGIS, if I use the delete flag?

If not (I mean if the space needed during the process of importing data into db is the same and only the resulting database is smaller) suggest me a tool for dropping some nodes or ways with certain tags from the planet.osm in order to produce a smaller planet file for use with osm2pgsql.

  • What is the difference between nocache flag and delete? Commented Jun 1, 2016 at 7:35

1 Answer 1


You can have a closer look at tools like osmosis or even better, faster, easier and smaller: osmfilter

Read instructions in the OSM wiki how to filter data types like nodes, ways or relations, by key or by value.

Maybe you can get a result file that can be imported in any database much faster.

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.