0

The data was imported using the following command:

osmosis --read-pbf file="/usr/local/lib/geoserver-2.1.3/data_dir/argentina.osm.pbf" --write-pgsql database="argosm" password="1234.5" user="argosm"

And previously these commands were issued:

sudo su postgres

createdb argosm createlang plpgsql argosm

psql -d argosm -f /usr/share/postgresql/9.1/contrib/postgis-2.0/postgis.sql psql -d argosm -f /usr/share/postgresql/9.1/contrib/postgis-2.0/spatial_ref_sys.sql

psql -d argosm -f /usr/share/postlbs/routing_core.sql psql -d argosm -f /usr/share/postlbs/routing_core_wrappers.sql psql -d argosm -f /usr/share/postlbs/routing_topology.sql

The following tables have been created:

  • nodes
  • relations
  • relation_members
  • schema_info
  • spatial_ref_sys
  • users
  • way_nodes
  • ways

Then I added a store in GeoServer, but the only layer I can see with OpenLayers, QGIS and so on is "nodes".

No rivers, streets, and no street names. I don't know what can I do with this data, or did I miss some step?

All processes ended normally, no errors during import.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Martin0x777
  • 611
  • 1
  • 5
  • 14

2 Answers2

3

From my OSM experience Osmosis is not the tool you are looking for.

Osmosis will dump the raw OSM data directly into your PostGIS schema without any data processing, so all you'll get is a huge list of 'nodes' and 'ways' but no useful relationships between them.

osm2pgsql will import your data and do some intelligent processing using the OSM relations metadata - converting closed 'ways' into polygons for lakes, landuse areas etc. Also the resulting PostGIS schema will be much easier to work with in GeoSever, and should be compatible with some of the OSM-style SLDs you can find online (search this site and the GeoServer Users mailing list for numerous discussions around these SLDs).

I believe there are other OSM loading tools you could use but my best experience was with osm2pgsql. You should check out How is raw OSM data processed for openstreetmap.org on a similar subject.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
tomfumb
  • 3,678
  • 1
  • 31
  • 59
1

A better tool for importing OSM data would be Imposm. Which you can also use with Tilemill (google OSMBright for Tilemill) to easily preview your map. Imposm is good for use with Mapnik library

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
U2ros
  • 5,117
  • 5
  • 29
  • 51