This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Need some clarification for the osm2pgsql multi-backend documentation.

1

I was reading the osm2pgsql documentation on github for info on loading a custom lua script but I am confused on some of the instructions.

In the file osm2pgsql/docs/lua.md, under the "How To" section, it gives as an example:

osm2pgsql -S your.style --tag-transform-script your.lua --hstore-all extract.osm.pbf

These five questions pertain to the example above:

  1. Is the multi-backend used to create postgres tables directly or is it more for filtering out unwanted metadata from osm when importing a pbf?
  2. What are the different file formats that can be passed to the "-S" option? .style? .json? others?
  3. When loading in custom styles, is the option "--hstore-all" required? Can we use one of the other hstore options instead?
  4. If we already have a database loaded, will osm2pgsql build the newly styled tables by reading from the database or does it always read from pbf file.
  5. Using --append, and assuming the new table names in the style file are different from what already exists in the database, does osm2pgsql just create the new tables alongside the preexisting ones?

The last question is in regards to header in the osm2pgsql/multi.style.json file:

-- This is an example Lua transform for a multi style -- It is not intended for use directly with --tag-transform-script but -- for use from multi.style.json

What is meant by "not intended for"? Is it because the format of the style is json?

Thanks,

Will

asked 31 Aug '16, 15:25

placebo10's gravatar image

placebo10
71336
accept rate: 0%

edited 31 Aug '16, 15:32

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866

Source code available on GitHub .