Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

column "tags" does not exist #51

Closed
7tonin opened this issue Mar 6, 2019 · 2 comments

Comments

@7tonin
Copy link

commented Mar 6, 2019

Bonjour,
osm2pgsql 0.96.0
PostgreSQL 9.6.12
PostGIS 2.5.2dev
J'ai initialement importé dans la base gis avec osm2pgsql fichier.osm (via export JOSM)

Et quand j'execute les requêtes additions.sql, il y a cette erreur d'absence de la colonne "tags".

psql -d gis -f ../osmfr-cartocss/additions.sql 
CREATE TABLE
CREATE TABLE
GRANT
INSERT 0 1
INSERT 0 1
INSERT 0 1
CREATE INDEX
psql:../osmfr-cartocss/additions.sql:25: ERROR:  relation "planet_osm_polygon_place" already exists
psql:../osmfr-cartocss/additions.sql:26: ERROR:  column "tags" does not exist
LIGNE 1 : ...insee on planet_osm_polygon using gist(way) where tags ? 're...
                                                               ^
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
psql:../osmfr-cartocss/additions.sql:32: ERROR:  column "tags" does not exist
LIGNE 1 : ...ere place IS NOT NULL AND (capital IS NOT NULL OR tags ? 'is...
                                                               ^
CREATE INDEX
psql:../osmfr-cartocss/additions.sql:34: ERROR:  column "tags" does not exist
LIGNE 1 : ...efinsee on planet_osm_point using gist(way) where tags ? 're...
                                                               ^
psql:../osmfr-cartocss/additions.sql:35: ERROR:  column "tags" does not exist
LIGNE 1 : ...efsandre on planet_osm_line using gist(way) where tags ? 're...
                                                               ^
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX

Alors j'ai trouvé ça, rejouer l'import fichier.osm avec l'option -k ; mais sans succès. tilemill-project/tilemill#2606 (comment)

L'erreur de colonne manquante tags, ressurgit en erreur sur l'interface web kosmtik
Postgis Plugin: ERROR: column "tags" does not exist LINE 4: FROM ( SELECT way,coalesce(tags->'leaf_type'... ^ in executeQuery Full sql was: 'SELECT * FROM /* landcover */ (SELECT
Si quelqu'un avait une idée... merci de votre attention.

@7tonin

This comment has been minimized.

Copy link
Author

commented Mar 6, 2019

...(idem en passant de JOSM v9329 à v14824)

@7tonin

This comment has been minimized.

Copy link
Author

commented Mar 8, 2019

Good news !
column tags is missing because PostgreSQL is missing hstore extension:

  1. install postgresql-contrib (or postgresql9.6-contrib, ... accordingly to your system)
  2. install extension psql -d yourproject_production -U yourdbuser -W
    # in the psql shell
    CREATE EXTENSION hstore;
    \q
    (from https://gist.github.com/terryjray/3296171)
  3. use -k|--hstore option while running osm2psql (other hstore options: osm2psql -hv)

Then if another error pops up; like Postgis Plugin: ERROR: relation "planet_osm_rels" does not exist

  • use -s|--slim option (without --drop option)

Finally, my working import command is : osm2pgsql -d gis -ks myzone.osm

@7tonin 7tonin closed this Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.