omniscale/imposm3

function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist in query

rotsee opened this issue ยท 2 comments

When importing a OSM pbf file with the example mapping json provided, I get the following error:

SQL Error: pq: function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist in query SELECT AddGeometryColumn('import', 'osm_buildings', 'geometry', '3857', 'GEOMETRY', 2);

The command was imposm import -mapping example-mapping.json -connection postgis://{USER}:{PWD}@localhost/imposm -read ./sweden-latest.osm.pbf -write
Any clues how to tourble shoot this?

$ imposm version
0.10.0
$
$ psql --version
psql (PostgreSQL) 12.2 (Ubuntu 12.2-4)

I'm at Ubuntu 20.04, in case that matters.

The AddGeometryColumn() is a PostGis function ; so you have to focus on the Postgis setup.

Question 1: The postgis extension has been enabled? ( '"CREATE EXTENSION postgis;"' )

Question 2: What is your postgis version ? SELECT PostGIS_Version();

Oh, I feel stupid now. I forgot to enable PostGIS!

Thank you!