Skip to content

Commit 6f7e5fa

Browse files
committed
Merge branch 'upstream/master' into nocolumn
2 parents b75a2b6 + 108e05d commit 6f7e5fa

289 files changed

Lines changed: 31177 additions & 6623 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@ aclocal.m4
55
autom4te.cache/
66
config.guess
77
config.h.in
8-
config.h.in~
98
config.sub
109
configure
1110
compile
1211
depcomp
13-
fileformat.pb-c.c
14-
fileformat.pb-c.h
1512
install-sh
16-
legacy/Makefile.in
1713
ltmain.sh
1814
m4/libtool.m4
1915
m4/ltoptions.m4
@@ -22,17 +18,21 @@ m4/ltversion.m4
2218
m4/lt~obsolete.m4
2319
missing
2420
nodecachefilereader
25-
osmformat.pb-c.c
26-
osmformat.pb-c.h
2721
osm2pgsql
2822

23+
contrib/protobuf/osmpbf/fileformat.pb.h
24+
contrib/protobuf/osmpbf/osmformat.pb.h
25+
fileformat.pb.cc
26+
fileformat.pb.h
27+
osmformat.pb.cc
28+
osmformat.pb.h
29+
30+
2931
Makefile
3032
config.h
3133
config.log
3234
config.nice
3335
config.status
34-
legacy/.deps/
35-
legacy/Makefile
3636
libtool
3737
.deps/
3838
stamp-h1
@@ -45,18 +45,24 @@ tests/.dirstamp
4545
tests/test-parse-xml2
4646
tests/test-middle-ram
4747
tests/test-middle-pgsql
48+
tests/test-middle-flat
4849
tests/test-pgsql-escape
4950
tests/test-parse-options
51+
tests/test-output-multi-tags
5052
tests/test-output-multi-line
53+
tests/test-output-multi-line-storage
5154
tests/test-output-multi-point
5255
tests/test-output-multi-point-multi-table
5356
tests/test-output-multi-polygon
57+
tests/test-output-multi-poly-trivial
5458
tests/test-output-pgsql
59+
tests/test-output-pgsql-tablespace
60+
tests/test-output-pgsql-z_order
5561
tests/test-expire-tiles
5662
tests/test-hstore-match-only
5763
tests/*.log
5864
tests/*.trs
59-
tests/test_output_pgsql_area_way.flat.nodes.bin
65+
tests/*.flat.nodes.bin
6066

6167
.libs/
6268
*.lo

.travis.yml

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,47 @@
11
language: cpp
2-
compiler:
3-
- gcc
4-
- clang
5-
env:
6-
- USE_LUA=true BOOST_PPA=false
7-
- USE_LUA=true BOOST_PPA=1.54
8-
- USE_LUA=true BOOST_PPA=1.55
9-
# Skip some parts of the matrix for speed
10-
# - USE_LUA=false BOOST_PPA=false
11-
# - USE_LUA=false BOOST_PPA=1.54
12-
- USE_LUA=false BOOST_PPA=1.55
13-
before_install:
14-
- |-
15-
if [ "${BOOST_PPA}" != "false" ]; then
16-
sudo add-apt-repository -y ppa:boost-latest/ppa
17-
fi
18-
- sudo apt-get update -qq
2+
sudo: false
3+
addons:
4+
apt:
5+
sources:
6+
- boost-latest
7+
- ubuntu-toolchain-r-test
8+
packages:
9+
- g++-4.8
10+
- libtool
11+
- libexpat1-dev
12+
- libprotobuf-dev
13+
- protobuf-compiler
14+
- libgeos-dev
15+
- libgeos++-dev
16+
- libpq-dev
17+
- libbz2-dev
18+
- libproj-dev
19+
- lua5.2
20+
- liblua5.2-dev
21+
- libboost1.55-dev
22+
- libboost-system1.55-dev
23+
- libboost-filesystem1.55-dev
24+
- libboost-thread1.55-dev
25+
matrix:
26+
include:
27+
- os: linux
28+
compiler: clang
29+
- os: linux
30+
compiler: gcc
31+
# update versions
1932
install:
20-
- sudo apt-get install -y -qq autoconf automake libtool make g++ libpq-dev libxml2-dev libbz2-dev libproj0 proj-bin libproj-dev # core deps
21-
- |-
22-
if [ "${BOOST_PPA}" = "false" ]; then
23-
sudo apt-get install -y -qq libboost1.48-all-dev
24-
else
25-
sudo apt-get install -y -qq boost${BOOST_PPA}
33+
- if [[ $CC == 'gcc' ]]; then
34+
export CC=gcc-4.8;
2635
fi
27-
- sudo apt-get install -y -qq protobuf-c-compiler libprotobuf-c0-dev
28-
- sudo apt-get install -y -qq libgeos-3.3.3 libgeos-dev libgeos++-dev
29-
- |-
30-
if [ "${USE_LUA}" = "true" ]; then
31-
sudo apt-get install -y -qq lua5.2 liblua5.2-dev
36+
- if [[ $CXX == 'g++' ]]; then
37+
export CXX=g++-4.8;
3238
fi
3339
before_script:
40+
- $CXX --version
3441
- xml2-config --version
3542
- geos-config --version
3643
- proj | head -n1
37-
- |-
38-
if [ "${USE_LUA}" = "true" ]; then
39-
lua -v
40-
fi
44+
- lua -v
4145
script:
4246
./autogen.sh && ./configure && make -j2
4347
after_failure:

AUTHORS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
osm2pgsql was written by Jon Burgess, Artem Pavlenko, Martijn van Oosterhout
2-
Sarah Hoffman, Kai Krueger, Frederik Ramm, Brian Quinion and other
3-
OpenStreetMap project members.
2+
Sarah Hoffmann, Kai Krueger, Frederik Ramm, Brian Quinion, Matt Amos,
3+
Kevin Kreiser, Paul Norman and other OpenStreetMap project members.

CONTRIBUTING.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Osm2pgsql contribution guidelines
2+
3+
## Workflow
4+
5+
We operate the "Fork & Pull" model explained at
6+
7+
https://help.github.com/articles/using-pull-requests
8+
9+
You should fork the project into your own repo, create a topic branch
10+
there and then make one or more pull requests back to the openstreetmap repository.
11+
Your pull requests will then be reviewed and discussed.
12+
13+
## History
14+
15+
To understand the osm2pgsql code, it helps to know some history on it. Osm2pgsql
16+
was written in C in 2007 as a port of an older Python utility. In 2014 it was
17+
ported to C++ by MapQuest and the last C version was released as 0.86.0. In it's
18+
time, it has had varying contribution activity, including times with no
19+
maintainer or active developers.
20+
21+
Parts of the codebase still clearly show their C origin and could use rewriting
22+
in modern C++, making use of data structures in the standard library.
23+
24+
## Versioning
25+
26+
Osm2pgsql uses a X.Y.Z version number, where Y tells you if you are on a stable
27+
or development series. Like the Linux Kernel, even numbers are stable and
28+
development versions are odd.
29+
30+
Bugs and known issues are fixed on the main branch only. Exceptions may be made
31+
for easy bug fixes, or if a patch backporting a fix is provided.
32+
33+
## Code style
34+
35+
The current codebase is a mix of styles, but new code should be written in the
36+
[K&R 1TBS style](https://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS) with
37+
4 spaces indentation. Tabs should never be used in the C++ code.
38+
39+
e.g.
40+
41+
```
42+
int main(int argc, char *argv[])
43+
{
44+
...
45+
while (x == y) {
46+
something();
47+
somethingelse();
48+
49+
if (some_error) {
50+
do_correct();
51+
} else {
52+
continue_as_usual();
53+
}
54+
}
55+
56+
finalthing();
57+
...
58+
}
59+
```
60+
61+
Names should use underscores, not camel case, with class/struct names ending in `_t`.
62+
63+
## Platforms targeted
64+
65+
Ideally osm2pgsql should compile on Linux, OS X, FreeBSD and Windows. It is
66+
actively tested on Debian, Ubuntu and FreeBSD by the maintainers.
67+
68+
## Testing
69+
70+
The code also comes with a suite of tests which can be run by
71+
executing ``make check``.
72+
73+
Most of these tests depend on being able to set up a database and run osm2pgsql
74+
against it. You need to ensure that PostgreSQL is running and that your user is
75+
a superuser of that system. To do that, run:
76+
77+
```sh
78+
sudo -u postgres createuser -s $USER
79+
sudo mkdir -p /tmp/psql-tablespace
80+
sudo chown postgres.postgres /tmp/psql-tablespace
81+
psql -c "CREATE TABLESPACE tablespacetest LOCATION '/tmp/psql-tablespace'" postgres
82+
```
83+
84+
Once this is all set up, all the tests should run (no SKIPs), and pass
85+
(no FAILs). If you encounter a failure, you can find more information
86+
by looking in the `test-suite.log`. If you find something which seems
87+
to be a bug, please check to see if it is a known issue at
88+
https://github.com/openstreetmap/osm2pgsql/issues and, if it's not
89+
already known, report it there.
90+
91+
If running the tests in a virtual machine, allocate sufficient disk space for a
92+
20GB flat nodes file.
93+
94+
### Performance Testing
95+
96+
If performance testing with a full planet import is required, indicate what
97+
needs testing in a pull request.
98+
99+
## Maintainers
100+
101+
The current maintainers of osm2pgsql are [Sarah Hoffmann](https://github.com/lonvia/)
102+
and [Paul Norman](https://github.com/pnorman/). Sarah has more experience with
103+
the gazetteer backend and Paul with the pgsql and multi backends.

0 commit comments

Comments
 (0)