Commit Graph

52 Commits

Author SHA1 Message Date
61bdfb4bc5 Add/update copyright notice on all C++ files
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).
2020-12-19 11:25:07 +01:00
4385d22a51 Move common pg testing code into "testing" namespace
This is more consistent with the other testing code which is also in
this namespace.
2020-12-09 15:20:11 +01:00
ca571e34a2 Add regression test case for liechtenstein bz2 parsing 2019-12-10 18:07:50 +01:00
56927b8cfb Move catch2 into contrib, update to current version
This way it can be included as system include and is easier to set apart
in coverage checks etc.
2019-11-20 12:14:00 +01:00
069c2830ec clang-format tests 2019-11-15 21:52:42 +01:00
8859b6eb8e move new tests into place 2019-11-15 21:52:42 +01:00
aeb845a0cd rewrite basic pgsql output test in catch 2019-11-15 21:52:41 +01:00
e64d8fdeaf move table to db_copy classes 2019-02-16 22:03:05 +01:00
de71d16c62 initial implementation of buffer filling functions in db-copy 2019-02-16 22:03:05 +01:00
5eaaf99409 fix warnings appearing with -Wextra
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.
2019-02-09 17:36:31 +01:00
39665dc961 split middle-pgsql into insert and query class
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.
2019-01-18 23:54:31 +01:00
b5809ed9a1 Hand outputs a shared pointer to the middle query object
Binds the lifetime of the middle objects to the outputs.
2019-01-13 12:02:47 +01:00
4ca2ed5f4b osmdata: remove unused projection member 2019-01-12 18:17:43 +01:00
b7ec16d858 Split middle interface between insert query and insert
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.
2019-01-06 19:32:44 +01:00
914ff8b605 also remove all old-style MP tag copying 2018-12-12 21:13:45 +01:00
4c91bed724 remove support for old-style MPs
Also removes support for superseding ways from polygons.
The lua bindings still expect that the supersede table
is present but will simply drop it.
2018-12-12 21:13:45 +01:00
c1f8052097 Merge pull request #693 from pnorman/test_renumber
Renumber test files
2017-03-03 20:19:24 +01:00
ade9d4dc18 Renumber test files
This is done with osmium renumber, but required some changes to
tests that reference particular IDs.
2017-02-27 18:28:31 -08:00
728a4ff36c add multipolygon split-up 2017-02-03 22:09:02 +01:00
b9330ad11e remove scale option
No longer required, now that coordinates are cahced unprojected.
2017-01-03 23:41:52 +01:00
456f197cbd store unprojected coordinates in node caches
Moves reprojection until after node locations are retrieved
from the node caches and stores the unprojected coordinates.

This is a DB-breaking change. Reimport required.
2017-01-03 23:33:07 +01:00
c538ce4c82 do not handle extra attributes via parameter passthough
There are only three classes that really need the information
about extra attributes and they all already have access to the
options.
2016-12-11 23:37:51 +01:00
434000c1c1 make osmdata work directly with libosmium data types
Requires to move reprojection and addition of attributes into
the osmdata class.
2016-12-11 23:37:50 +01:00
e645e259a5 Switch from 900913 to 3857 2016-02-27 09:06:14 -08:00
0a6238da51 rework projection code
- 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)
2016-01-17 14:09:48 +01:00
79bc3cdb89 remove custom o5m parser in favour of libosmium parser
This commit includes some larger structural changes:

- parse_t and parse_delegate_t removed, osm2pgsql now directly
  creates a parse_osmium_t object
- bbox class replaced with osmium::Box
- code duplication in parse_stats_t cleaned up
- add generic parse() function for tests, also to avoid code duplication
2015-11-06 23:44:54 +01:00
881e53195d Better implementation using RAII to ensure that the file is removed even under exception conditions. 2015-10-10 17:41:27 -07:00
1400dd2cc5 Clean up flat nodes files after test to reclaim disk space. 2015-10-10 17:02:19 -07:00
34382ba8bd update to libosmium 2.3.0
- remove protobuf dependencies as libosmium now comes with its own pbf parser
- fix remaining uses of libxml2 as file format in tests
2015-08-19 00:10:31 +02:00
8845378bcd Move recurring DB test functions to common-pg 2015-07-30 00:27:53 -07:00
3d44d34db1 Move db options into database_options_t 2015-07-25 19:48:12 -07:00
8de5aa0276 Move parse into a constructor
Using a delgating constructor lets us set default options then
parse the command line.
2015-07-25 17:38:03 -07:00
8795dde014 Replace boost::scoped_ptr within tests 2015-07-18 18:10:00 -07:00
8b0ffe4a6a Replace boost::shared_ptr with std::shared_ptr 2015-07-18 02:14:31 -07:00
6b5a0fffbf Move from NULL to nullptr
This leaves alone the o5m code, geos, and libosmium.
2015-07-17 16:30:35 -07:00
ec83a3106a Fix skip_test.what() function defs
C++11 wants const noexcept to agree with the virtual definition
2015-07-16 16:09:03 -07:00
5e523c0e2d Update on/off options to bool 2015-07-14 00:51:53 -07:00
a441750597 correctly parse change files 2015-07-08 23:19:50 +02:00
6c4385e40c replace pbf and xml parser with libosmium
In this initial step libosmium only functions as another parser
frontend, replacing the pbf and xml parsers. o5m is still parsed
with the native parser.

Other notable changes include:

- refactor of parse.hpp
- retire UTFsanitizer and remove sanitize option
- make C++11 compiler mandatory (required by libosmium)
- update pbf proto descriptions
2015-07-08 21:53:26 +02:00
9d209bce39 Add latlong mode tests 2015-07-05 00:05:55 -07:00
45c820277f Isolate tablespace tests
By isolating tablespace tests to their own file, it is easier to
skip them if on a setup that does not permit a new tablespace for
testing.
2015-07-04 21:40:33 -07:00
a734ff23b0 clean up includes and remove unused rb.cpp
Includes cleaned according to the results of include-what-you-use.
2015-05-25 17:36:30 +02:00
f1efe8753c remove text-tree and make keyval a real C++ class 2014-12-28 21:38:47 +01:00
0502eb2590 get osm2pgsql working again with threaded pending. more perf stuff to do 2014-09-26 15:54:55 -04:00
de5f2aff3f add failing test for route relations duplication in lines table 2014-09-26 14:45:55 -04:00
d7d473a495 fix up ram cache misses in pending for middle_pgsql_t 2014-09-26 08:15:35 -04:00
3cb5132291 add a test for way area missing 2014-09-25 17:05:11 -04:00
3f06a4282d make clone test pass 2014-09-24 10:26:38 -04:00
659b9bb706 refactored a bunch of native pointers to smart ones. tests still failing for relations need to check old branch to see exepcted pending counts 2014-09-23 15:11:39 -04:00
fe7ce22419 Populate pending job queue prior to cloning out the middles and outputs.
Some other bug fixes and refactor.
Most tests pass now, but three still fail.
2014-09-22 21:07:07 -04:00