Skip to content

Commit

Permalink
Merge pull request #2157 from joto/remove-gazetteer-output
Browse files Browse the repository at this point in the history
Remove gazetteer output and --with-forward-dependencies option
  • Loading branch information
lonvia authored Apr 6, 2024
2 parents c7578ac + 6c949b0 commit e82201c
Show file tree
Hide file tree
Showing 24 changed files with 17 additions and 2,414 deletions.
11 changes: 2 additions & 9 deletions man/osm2pgsql.1
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,12 @@ too.
.TP
-O, --output=OUTPUT
Specifies the output to use.
Currently osm2pgsql supports \f[B]pgsql\f[R], \f[B]flex\f[R],
\f[B]gazetteer\f[R] and \f[B]null\f[R].
Currently osm2pgsql supports \f[B]pgsql\f[R], \f[B]flex\f[R], and
\f[B]null\f[R].
\f[B]pgsql\f[R] is the default output still available for backwards
compatibility.
New setups should use the \f[B]flex\f[R] output which allows for a much
more flexible configuration.
The \f[B]gazetteer\f[R] output is intended for geocoding with Nominatim
only.
The \f[B]null\f[R] output does not write anything and is only useful for
testing or with \f[B]--slim\f[R] for creating slim tables.
.TP
Expand Down Expand Up @@ -346,11 +344,6 @@ index after the other.
.TP
--number-processes=THREADS
Specifies the number of parallel threads used for certain operations.
.TP
--with-forward-dependencies=BOOL
Propagate changes from nodes to ways and node/way members to relations
(Default: \f[V]true\f[R]).
This option is deprecated.
.SH SEE ALSO
.IP \[bu] 2
osm2pgsql website (https://osm2pgsql.org)
Expand Down
15 changes: 5 additions & 10 deletions man/osm2pgsql.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,11 @@ mandatory for short options too.

-O, \--output=OUTPUT
: Specifies the output to use. Currently osm2pgsql supports **pgsql**,
**flex**, **gazetteer** and **null**. **pgsql** is
the default output still available for backwards compatibility. New
setups should use the **flex** output which allows for a much more flexible
configuration. The **gazetteer** output is intended for geocoding with
Nominatim only. The **null** output does not write anything and is only
useful for testing or with **\--slim** for creating slim tables.
**flex**, and **null**. **pgsql** is the default output still available for
backwards compatibility. New setups should use the **flex** output which
allows for a much more flexible configuration. The **null** output does not
write anything and is only useful for testing or with **\--slim** for
creating slim tables.

-S, \--style=FILE
: The style file. This specifies how the data is imported into the database,
Expand Down Expand Up @@ -307,10 +306,6 @@ mandatory for short options too.
\--number-processes=THREADS
: Specifies the number of parallel threads used for certain operations.

\--with-forward-dependencies=BOOL
: Propagate changes from nodes to ways and node/way members to relations
(Default: `true`). This option is deprecated.

# SEE ALSO

* [osm2pgsql website](https://osm2pgsql.org)
Expand Down
2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ target_sources(osm2pgsql_lib PRIVATE
dependency-manager.cpp
expire-tiles.cpp
expire-output.cpp
gazetteer-style.cpp
geom.cpp
geom-box.cpp
geom-from-osm.cpp
Expand All @@ -29,7 +28,6 @@ target_sources(osm2pgsql_lib PRIVATE
node-persistent-cache.cpp
ordered-index.cpp
osmdata.cpp
output-gazetteer.cpp
output-null.cpp
output-pgsql.cpp
output.cpp
Expand Down
29 changes: 1 addition & 28 deletions src/command-line-parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,7 @@ options_t parse_command_line(int argc, char *argv[])

// --output
app.add_option("-O,--output", options.output_backend)
->description("Set output ('pgsql' (default), 'flex', 'gazetteer' "
"(deprecated), 'null').")
->description("Set output ('pgsql' (default), 'flex', 'null').")
->type_name("OUTPUT")
->group("Output options");

Expand Down Expand Up @@ -635,29 +634,6 @@ options_t parse_command_line(int argc, char *argv[])
->option_text("TYPE")
->group("Deprecated options");

// --with-forward-dependencies
app.add_option_function<std::string>(
"--with-forward-dependencies",
[&](std::string const &arg) {
log_warn("The option --with-forward-dependencies is deprecated "
"and will soon be removed.");
if (arg == "false") {
options.with_forward_dependencies = false;
return;
}
if (arg == "true") {
options.with_forward_dependencies = true;
return;
}
throw fmt_error(
"Unknown value for --with-forward-dependencies option: {}",
arg);
})
->description("Propagate changes from nodes to ways and node/way "
"members to relations (default: true).")
->option_text("BOOL")
->group("Deprecated options");

try {
app.parse(argc, argv);
} catch (...) {
Expand Down Expand Up @@ -718,9 +694,6 @@ options_t parse_command_line(int argc, char *argv[])

if (options.output_backend == "flex") {
check_options_output_flex(app);
} else if (options.output_backend == "gazetteer") {
log_warn(
"The 'gazetteer' output is deprecated and will soon be removed.");
} else if (options.output_backend == "null") {
check_options_output_null(app);
} else if (options.output_backend == "pgsql" ||
Expand Down
Loading

0 comments on commit e82201c

Please sign in to comment.