Removes all code from the options_t class and makes it into a simple
struct. All code parsing and checking the command line is now in
command-line-parser.hpp/cpp.
Use consistently named functions parse_*_param() for all parameters of
command line options that are more complex to parse. And test them!
Also add print_version() function.
This adds a copyright notice to all C++ files and the README clarifying
the license. (There is no change of the license.) This also removes a
few names explicitly mentioned as copyright holders, instead refering to
the git log which has a full list of all osm2pgsql developers. (There is
also still the AUTHORS file which names the most important developers.)
The only exception is the sprompt.cpp file which was taken from
PostgreSQL and keeps its original license information (and, of course,
the files in contrib).
Sources files (*pp) are moved into `src` directory. Also renames
taginfo_impl.hpp to taginfo-impl.hpp.
Adds a new src/CMakeLists.txt which is called from the main
CMakeLists.txt. The libosm2pgsql.a library is now built in the src
directory, but the osm2pgsql is still built in the main build directory.
This fixes pretty much exclusively unsued-parameter
warnings. Removes some function parameters which have
fallen out of use and also the permutating parameter
test. The latter did not really do what it promised
and was pretty much beyond repair.
The query instance can work on a single connection. This saves
a couple of connections in the processing stage.
Requires slightly changing the behviour of the connections
that copy in the data. They need to commit, so that the
data becomes visible.
middle also needs to start the tables earlier, because
the tables must have been created when preparing queries
in the query connection.
Middle has three interface classes: middle_query_t, middle_t
and slim_middle_t. They inherit from each other. This is
problematic when one wants to supply a middle implementation
that follows a similar inheritence structure.
There is actualy no need that the interfaces for inserting
(middle_t and slim_middle_t) inherit from middle_query_t.
The code is very clear about which interface is needed by
which class.
This change splits off the middle_query_t interface and
cleans up the code where the clear distinction was still
missing.
Needs some larger rework of the middle test which did rely
on being able to access both interface types. There is now
a template class for testing middle that also contains
some more common boilerplate code.
The constructor of expire_tiles_t expects uint32_t and the conversion to
unsigned has to happen anywhere. In addition, some more checks on the
arguments supplied by the user and a unit test for option `-e` does not harm.
This commit adapts output_pgsql_t and output_multi_t because zoom level 0
for the tile expiry now means that no expiry output is requested.
Instead of defaulting to gis, the default database is unspecified,
and libpq will decide what to connect to in those cases. This will
normally rely on PGDATABASE or its compiled defaults.
- make use of osmium's proj wrapper class CRS
- use virtual functions instead of switching over projection
- remove duplicate code (mainly WSG84 to mercator transformation)
- use custom projections also with --proj 4326 and 900913 (fixes#514)