HI I’m trying to import OSM data into postgres. I’ve tried downloading files (e.g http://download.geofabrik.de/australia-oceania/australia-latest.osm.pbf ) and importing using osm2pgsql. The import seems to succeed, but the resulting data do not look right. The resulting data appear be a very sparse grid, and do not represent streets at all. I’ve tried using similar datasets from other regions such as Europe and the result is similar.
SHP files seem to be fine. I only have a problem with PBF and OSM. Unfortunately SHP is not available for my required region (Australia).
Here’s an example of my import command:
osm2pgsql -c -s -d $dbname -U $user -W -H $host -E 4283 -S default.style australia-latest.osm.pbf
If you think the problem lies with osm2pgsql, you could ask there: https://github.com/openstreetmap/osm2pgsql/issues
If you don’t need too much data, you could use Overpass-Turbo to just extract what you need in various formats.
Or you could convert the osm file to sqlite format, which works perfectly fine with QGIS (and from there it’s easy to shape)
The osm2pgsql options that you need to use will depend on what you want to do with the database afterwards. If it helps, what I do to create a rendering database is described at http://wiki.openstreetmap.org/wiki/User:SomeoneElse/Ubuntu_1404_tileserver. I’ve certainly downloaded Australian data from Geofabrik previously and haven’t noticed any “missing data” issues.