This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Errors when compiling Osmium example

0

I'm trying to compile the examples from Osmium, but I get an error.

$:~/osmium/examples$ make

g++ -g -Wall -Wextra -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wno-long-long -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -DOSMIUM_WITH_DEBUG -I/usr/include/libxml2 -o osmium_convert osmium_convert.cpp -lexpat -lz -lpthread -lprotobuf-lite -losmpbf -lxml2
In file included from ../include/osmium/handler.hpp:33:0,
                 from ../include/osmium/input.hpp:29,
                 from ../include/osmium/input/pbf.hpp:35,
                 from ../include/osmium.hpp:26,
                 from osmium_convert.cpp:33:
../include/osmium/osm/area.hpp:27:36: fatal error: geos/geom/MultiPolygon.h: No such file or directory
compilation terminated.
make: *** [osmium_convert] Error 1

$:~/osmium/examples$

asked 05 Jan '13, 16:45

Rub21's gravatar image

Rub21
11356
accept rate: 0%

edited 06 Jan '13, 08:42

Jochen%20Topf's gravatar image

Jochen Topf
5.2k55074


2 Answers:

2

You have to install all the prerequisites mentioned in the README. In this case you are missing the GEOS library (or have a version that's too old). This wiki page may also help you: https://wiki.openstreetmap.org/wiki/Osmium/Quick_Start

answered 06 Jan '13, 08:39

Jochen%20Topf's gravatar image

Jochen Topf
5.2k55074
accept rate: 31%

1

On my ubuntu, i had to install libgeos++-dev from the ubuntu repository with success

answered 16 Jan '13, 18:11

BrunoC's gravatar image

BrunoC
261
accept rate: 0%

edited 17 Jan '13, 07:23

scai's gravatar image

scai ♦
33.3k21309459

Source code available on GitHub .