Subscribe to the RSS feed by copy/paste the link below
RSS

Creating an OSM Database

Posted by Admin on 6. April, 2024
MyBlog ยป

Things have changed it seems and I was getting errors like:

ERROR: Database is not using UTF8 encoding.

When inserting new data.

I needed to drop the DB and re-created with thecorrect encoding.

psql -d postgres  -c "CREATE DATABASE osm_wales  WITH TEMPLATE=template0 ENCODING='UTF8';"

psql -d osm_wales -c "CREATE EXTENSION IF NOT EXISTS postgis;"

psql -d osm_wales -c "CREATE EXTENSION IF NOT EXISTS hstore;"

Then I could run

/usr/bin/osm2pgsql  -c -d osm_wales wales-latest.osm.pbf

successfully again.

 

Last changed: 6. April, 2024 at 10:56

Back to Overview