omniscale / imposm3

Imposm imports OpenStreetMap data into PostGIS
http://imposm.org/docs/imposm3/latest/
Apache License 2.0
730 stars 157 forks source link

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

Closed rotsee closed 4 years ago

rotsee commented 4 years ago

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.

ImreSamu commented 4 years ago

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();

rotsee commented 4 years ago

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

Thank you!