openstreetmap-carto-de icon indicating copy to clipboard operation
openstreetmap-carto-de copied to clipboard

upstream DBSCHEME: column "name_hrb" does not exist

Open alexandervlpl opened this issue 2 years ago • 7 comments

I've followed INSTALL-de.md to get a style that works with the upstream OSM database:

  1. Installed the l10n stuff.
  2. Installed the views in contrib.
  3. Ran make DBSCHEME=upstream.

The resulting style still requires a "name_hrb" column which does not exist. What am I doing wrong?

alexandervlpl avatar May 15 '22 07:05 alexandervlpl

I never used the views in contrib myself thus it might well be buggy. I would have recommended using my scheme which has been designed to be compatible to upstream style.

This said I need to note here that I am currently working on replacing this style with my new l10n approach thus it will certainly get replaced in a few weeks time.

giggls avatar May 15 '22 09:05 giggls

Noted, I'll watch for the l10n update, thanks!

I was simply following INSTALL.md, which says to use contrib. I see that the SQL in views_osmde requires an hstore planet import, which I do not have:

ERROR: relation "planet_osm_hstore_line" does not exist

Both sets of views add a name_hrb column, so my guess is the generated style just isn't using the views somehow. Can anyone recommend a way to make this work without hacking the style?

alexandervlpl avatar May 15 '22 09:05 alexandervlpl

You need to follow https://github.com/giggls/openstreetmap-carto-de/blob/master/INSTALL-de.md not INSTALL.md The latter is a verbatim copy of upstream.

To cite from the README: "For Installation please read INSTALL-de.md first for differences of openstreetmap-carto-de."

Frankly I have no Idea why your view does not have the name_hrb column. Are you sure that you are using the views for rendering and not the upstream tables?

There is no style hacking required.

giggls avatar May 15 '22 09:05 giggls

I just had a look at https://github.com/giggls/openstreetmap-carto-de/blob/master/contrib/use-upstream-database/README.md in contrib directory.

"All references to tablenames in project.mml need to be adapted to reference the views instead of the real tables."

Did you do this?

Sven

giggls avatar May 15 '22 09:05 giggls

" You will then need to compile this project-mod.mml with carto, not the original project.mml"

giggls avatar May 15 '22 09:05 giggls

I am referring to INSTALL-de.md, which says:

Use the views provided in the contrib directory instead of the ones from above if you prefer this database layout.

I thought contrib/use-upstream-database/replace-tablenames.sh does the replacing, it's called by make DBSCHEME=upstream which creates and compiles project-mod.mml. Somehow the names are still wrong. If I change them in the inital project.mml, I end up with planet_osm_line_de_de.

I did manage to get farther by correcting the final XML. I'll try to find the issue in the scripting if I can get rendering to work.

alexandervlpl avatar May 15 '22 10:05 alexandervlpl

It does. But you need to also compile the resulting mml file using carto then.

Please keep in mind that you are following a contrib path of a project which is going to be deprecated in favour of a new approach in a few weeks time anyway.

giggls avatar May 15 '22 10:05 giggls