2

Trying to create a slippy map using apache2, renderd, and postgresql.

I started with just one state and used osm2pgsql to import it. I got everything working great and decided to scale up to North America.

I ran the same import command but with a different PBF and let it run all night. It finished this morning I started everything back up to find I am still only rendering the state.

I followed these instructions to get a slippy map working. I used only the Ohio PBF instead of the whole planet because it was taking a while to download. I got it all up and working great so I wanted to scale up to all of North America.

I downloaded the file and here is where I think I messed up: instead of using the --append flag I used the same osm2pgsql --slim --hstore -d gis -C 30000 -S openstreetmap-carto-2.41.0/openstreetmap-carto.style north-america-latest.pbf it ran for a little over a day and probably used 150GB of disk space.

It seemed to finish just fine but when I checked the map it was not rendering any of the new data. I now can't reimport the data because I'm getting an error:

failed: ERROR: duplicate key value violates unique constraint "planet_osm_ways_pkey"

I feel like there should just be another command I can run on the database to patch everything up to use all the data. I'm really hoping to not have to spend another day starting from scratch. Does anyone know the magic fix?

  • What were the precise steps that you used? – PolyGeo Dec 29 '16 at 23:57
  • @PolyGeo fixed per your wishes – Jacob Kern Dec 30 '16 at 0:36
  • Did you use the same database (gis) for both imports? Did you render data from the right database? Check the record counts in the planet_osm* tables. – Zoltan Dec 30 '16 at 8:22
  • @Zoltan, yes the dara base is the same because I copied the same command. I could have run it from a different user but I don't think so because one user wouldn't have the path to the style and in would expect it to have thrown an error. I'm not sure what you mean about rendering from the database. I'm not good with the database at all. I tried select count() from planet and it returned nothing – Jacob Kern Dec 30 '16 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.