minad / osm2shp

Convert large OpenStreetMap files to shapefiles (Uses sqlite3 db as temporary storage)
33 stars 16 forks source link

can you please post installation instructions? #6

Open otmezger opened 11 years ago

otmezger commented 11 years ago

I have a mac, running 10.8.3. if I run make, this is the output:

g++ -ggdb -Wall -Wredundant-decls -D_LARGEFILE_SOURCE -        D_FILE_OFFSET_BITS=64 -c osm2shp.cc -o osm2shp.o
In file included from osm/handler.hpp:4,
             from osm2shp.cc:1:
osm/point_database.hpp:9:40: error: osmium/osm/way_node_list.hpp: No such file or directory
In file included from osm2shp.cc:1:
osm/handler.hpp:10:30: error: osmium/osm/way.hpp: No such file or directory
osm/handler.hpp:11:31: error: osmium/osm/node.hpp: No such file or directory
osm/handler.hpp:12:30: error: osmium/handler.hpp: No such file or directory
osm2shp.cc:3:22: error: osmium.hpp: No such file or directory
In file included from osm/handler.hpp:4,
             from osm2shp.cc:1:
osm/point_database.hpp:22: error: expected ‘,’ or ‘...’ before ‘::’ token
osm/point_database.hpp:22: error: ISO C++ forbids declaration of ‘Osmium’ with no type
In file included from osm2shp.cc:1:
osm/handler.hpp:18: error: ‘Osmium’ has not been declared
osm/handler.hpp:18: error: expected `{' before ‘Base’
osm/handler.hpp:18: error: function definition does not declare parameters
osm2shp.cc: In function ‘int main(int, char**)’:
osm2shp.cc:8: error: ‘cerr’ is not a member of ‘std’
osm2shp.cc:12: error: ‘Osmium’ has not been declared
osm2shp.cc:14: error: ‘Osmium’ has not been declared
osm2shp.cc:14: error: expected `;' before ‘infile’
osm2shp.cc:15: error: variable ‘osm::handler handler’ has initializer but incomplete type
osm2shp.cc:16: error: ‘infile’ was not declared in this scope
osm2shp.cc:19: error: ‘cerr’ is not a member of ‘std’
make: *** [osm2shp.o] Error 1

Thanks.

minad commented 11 years ago

You are missing the osmium library

otmezger commented 11 years ago

where do I get it? can you post the link to the repository? that would be just great. Thanks

minad commented 11 years ago

http://wiki.openstreetmap.org/wiki/Osmium

otmezger commented 11 years ago

so, I need to get osmium from github (https://github.com/joto/osmium), compile it, and put it within the clone of your repository?

joushx commented 11 years ago

Try sudo apt-get install libosmium-dev

arasbm commented 10 years ago

Hi, I am also having build issues. I just cloned your project, installed the above lib and when I try make I get this error:

]$ make
g++ -ggdb -Wall -Wredundant-decls -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c osm2shp.cc -o osm2shp.o
In file included from osm2shp.cc:5:0:
/usr/include/osmium.hpp:45:27: fatal error: osmpbf/osmpbf.h: No such file or directory
compilation terminated.
make: *** [osm2shp.o] Error 1

Any help would be appreciated.

ngandt-54 commented 10 years ago

sudo apt-get install libosmpbf-dev

dimhold commented 10 years ago

+1 for installation instructions.

I got compilation error: shapefil.h not found

make
g++ -ggdb -Wall -Wredundant-decls -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c osm2shp.cc -o osm2shp.o
g++ -ggdb -Wall -Wredundant-decls -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c osm/shapefile.cc -o osm/shapefile.o
In file included from osm/shapefile.cc:1:0:
osm/shapefile.hpp:4:22: fatal error: shapefil.h: No such file or directory
 #include <shapefil.h>
                      ^
compilation terminated.
make: *** [osm/shapefile.o] Error 

How I fixed issue:

wget http://download.osgeo.org/shapelib/shapelib-1.3.0.zip
unzip shapelib-1.3.0
cd shapelib-1.3.0
su -c 'make && make install'