In this recipe, you will import OpenStreetMap (OSM) data to PostGIS using the osm2pgsql command.
You will first download a sample dataset from the OSM website, and then you will import it using the osm2pgsql command.
You will add the imported layers in GIS desktop software and generate a view to get subdatasets, using the hstore PostgreSQL additional module to extract features based on their tags.