I am new to all things GIS! However, I need to set up a full GIS infrastructure for a project.
I have installed a Postgres server with PostGIS. That is on ancient hardware for now, 32bits processor with 1GB of RAM, Ubuntu 12.04.
I have imported OSM data from geofabrik.de into my server using osm2pgsql.
The first issue I had was a problem with the osm.pbf files ("Document is empty"). I was more lucky with bz2. I "just" have an error message at the end but as it is at clean up time, I thought it was OK.
My command looks like this :
/usr/bin/osm2pgsql -d osm -s -K -S /usr/share/osm2pgsql/default.style languedoc-roussillon-latest.osm.bz2
The import log looks like this :
Committing transaction for planet_osm_polygon Committing transaction for planet_osm_line Committing transaction for planet_osm_roads Sorting data and creating indexes for planet_osm_polygon Sorting data and creating indexes for planet_osm_roads Sorting data and creating indexes for planet_osm_line Committing transaction for planet_osm_point Sorting data and creating indexes for planet_osm_point Completed planet_osm_point Completed planet_osm_roads Completed planet_osm_line Completed planet_osm_polygon Stopping table: planet_osm_nodes Stopping table: planet_osm_ways Stopping table: planet_osm_rels COPY_END for COPY planet_osm_nodes FROM STDIN; failed: ERROR: duplicate key value violates unique constraint "planet_osm_nodes_pkey" DETAIL: Key (id)=(2147483647) already exists. CONTEXT: COPY planet_osm_nodes, line 12179900 Error occurred, cleaning up Stopped table: planet_osm_rels Stopped table: planet_os_ways
Unfortunately, the data does not look good when I connect QGIS to my PosGIS DB.
It is very strange, but it seems that all polygons include one point at the center of the map.
I am not sure what is wrong or if it is related to the error that occurs at the end of the import.