Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use libosmium for geometry building #684

Merged
merged 30 commits into from
Mar 3, 2017
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7b39ca8
improve constness of parsed osmium objects
lonvia Jan 13, 2017
33f4cc7
add node retrival functions without projection
lonvia Jan 13, 2017
c8bc82f
initial version of osmium geometry building in output-pgsql
lonvia Jan 20, 2017
cf7e824
expire directly from wkb
lonvia Jan 22, 2017
0057767
add linemerger for route relations
lonvia Jan 24, 2017
728a4ff
add multipolygon split-up
lonvia Jan 25, 2017
e1b75a5
convert remaining outputs to libosmium
lonvia Feb 2, 2017
9bab69e
move wkb writing in a separate class
lonvia Feb 3, 2017
1c298b8
remove geometry builder and geos dependency
lonvia Feb 3, 2017
3d5c53d
remove unused functions from expire
lonvia Feb 3, 2017
dfd4a51
remove now unused write_row functions in table
lonvia Feb 3, 2017
29bd6cc
remove unused get_node_list() function for nodelist_t
lonvia Feb 4, 2017
a73c5ee
fix area string conversion
lonvia Feb 4, 2017
f5ddbc6
remove remaining traces of nodelist types
lonvia Feb 4, 2017
9822c40
streamline retival of ways for relations
lonvia Feb 4, 2017
b27b1b3
add converter from hex to binary wkb
lonvia Feb 4, 2017
0d491cf
output-multi: compute way_area only when there is a column with the name
lonvia Feb 4, 2017
eb9ec38
remove unused exclude-invalid-polygon option
lonvia Feb 4, 2017
7a354f2
remove unused code
lonvia Feb 4, 2017
e5837d7
Remove remaining geos references
pnorman Feb 7, 2017
04895af
Remove exclude invalid polygon references
pnorman Feb 8, 2017
7e880ab
update to newest libosmium version
lonvia Feb 10, 2017
cd9a0a7
fix number of polygons when creating MP
lonvia Feb 12, 2017
14130fc
fix location lookup in nodes table when node appears twice
lonvia Feb 12, 2017
364cb40
ignore invalid nodes when building areas
lonvia Feb 12, 2017
d491146
restore previous polygon behaviour
lonvia Feb 12, 2017
0333e11
adapt regression tests to new libosmium geometry creation
lonvia Feb 12, 2017
e7e355b
use size_t type for position
lonvia Feb 14, 2017
5131a63
check for bad endian setting when converting hex WKBs
lonvia Feb 28, 2017
b2a2d58
improve bad endian exception message
lonvia Mar 1, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ addons:
packages:
- g++-4.8
- libexpat1-dev
- libgeos-dev
- libgeos++-dev
- libpq-dev
- libbz2-dev
- libproj-dev
Expand Down Expand Up @@ -44,7 +42,6 @@ install:
before_script:
- $CXX --version
- xml2-config --version
- geos-config --version
- proj | head -n1
- lua -v
script:
Expand Down
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ endif()

include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})

find_package(Osmium REQUIRED COMPONENTS io geos proj)
find_package(Osmium REQUIRED COMPONENTS io proj)
include_directories(SYSTEM ${OSMIUM_INCLUDE_DIRS})

if (WITH_LUA)
Expand Down Expand Up @@ -167,7 +167,6 @@ endif()

set(osm2pgsql_lib_SOURCES
expire-tiles.cpp
geometry-builder.cpp
geometry-processor.cpp
id-tracker.cpp
middle-pgsql.cpp
Expand All @@ -177,6 +176,7 @@ set(osm2pgsql_lib_SOURCES
node-ram-cache.cpp
options.cpp
osmdata.cpp
osmium-builder.cpp
output-gazetteer.cpp
output-multi.cpp
output-null.cpp
Expand All @@ -195,7 +195,6 @@ set(osm2pgsql_lib_SOURCES
util.cpp
wildcmp.cpp
expire-tiles.hpp
geometry-builder.hpp
geometry-processor.hpp
id-tracker.hpp
middle-pgsql.hpp
Expand All @@ -205,6 +204,7 @@ set(osm2pgsql_lib_SOURCES
node-ram-cache.hpp
options.hpp
osmdata.hpp
osmium-builder.hpp
osmtypes.hpp
output-gazetteer.hpp
output-multi.hpp
Expand All @@ -224,6 +224,7 @@ set(osm2pgsql_lib_SOURCES
tagtransform.hpp
util.hpp
wildcmp.hpp
wkb.hpp
)

add_library(osm2pgsql_lib STATIC ${osm2pgsql_lib_SOURCES})
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ to configure and build itself and requires
Required libraries are

* [expat](http://www.libexpat.org/)
* [geos](http://trac.osgeo.org/geos)
* [proj](http://proj.osgeo.org/)
* [bzip2](http://www.bzip.org/)
* [zlib](http://www.zlib.net/)
Expand All @@ -57,15 +56,14 @@ On a Debian or Ubuntu system, this can be done with:
```sh
sudo apt-get install make cmake g++ libboost-dev libboost-system-dev \
libboost-filesystem-dev libexpat1-dev zlib1g-dev \
libbz2-dev libpq-dev libgeos-dev libgeos++-dev libproj-dev lua5.2 \
liblua5.2-dev
libbz2-dev libpq-dev libproj-dev lua5.2 liblua5.2-dev
```

On a Fedora system, use

```sh
sudo yum install cmake gcc-c++ boost-devel expat-devel zlib-devel bzip2-devel \
postgresql-devel geos-devel proj-devel proj-epsg lua-devel
postgresql-devel proj-devel proj-epsg lua-devel
```

On RedHat / CentOS first run `sudo yum install epel-release` then install
Expand All @@ -75,7 +73,7 @@ On a FreeBSD system, use

```sh
pkg install devel/cmake devel/boost-libs textproc/expat2 \
databases/postgresql94-client graphics/geos graphics/proj lang/lua52
databases/postgresql94-client graphics/proj lang/lua52
```

Once dependencies are installed, use CMake to build the Makefiles in a separate folder
Expand Down Expand Up @@ -110,7 +108,7 @@ cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON

## Usage ##

Osm2pgsql has one program, the executable itself, which has **44** command line
Osm2pgsql has one program, the executable itself, which has **43** command line
options.

Before loading into a database, the database must be created and the PostGIS
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ build_script:
- copy /y ..\*.style osm2pgsql-bin
- copy /y ..\*.lua osm2pgsql-bin
- copy /y %PREFIX%\bin\lua.dll osm2pgsql-bin
- copy /y %PREFIX%\bin\geos.dll osm2pgsql-bin
- copy /y "%PSQL_ROOT%\bin\libpq.dll" osm2pgsql-bin
- copy /y "%PSQL_ROOT%\bin\libintl-8.dll" osm2pgsql-bin
- copy /y "%PSQL_ROOT%\bin\libeay32.dll" osm2pgsql-bin
Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/README.contrib
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Source: https://github.com/osmcode/libosmium
Revision: v2.11.0
Revision: ab8236405330607932c8f6395956ec6d9bcdee5c