Open Rudloff opened 10 years ago
I get the same error. It seems that the project is no longer maintained. Should we try to find alternatives for converting osm data to shapefile?
I don't know if there are other projects which do that? I think there is a lot of movement going in the osm community. Maybe I could get this running again if many people are interested.
Currently the only seamless and working solution is to use postgresql. I've tried postgresql and confirm that it's working.
1- Install osm2pgsql (it's present in ubuntu repositories and correctly packaged, which installs required dependencies as well) 2- Create postgresql database with postgis extension 3- Use osm2pgsql to insert osm data into postgresql 4- Use pgsql2shp tool to dump postgres databases.
In my case, osm2pgsql created the following tables:
public | planet_osm_line | table | gis
public | planet_osm_point | table | gis
public | planet_osm_polygon | table | gis
public | planet_osm_roads | table | gis
I then used the following one-liner to dump those tables:
for i in {line,point,polygon,roads}; do pgsql2shp -f output$i -h localhost -u gis -P PASSWORD DATABASE planet_osm_$i; done
The process is a bit long. It would be good to have a tool that can operate on file. Rather than importing to database, and exporting it, operating solely on file is preferred. That's your choice, sir. If you have time, it would be awesome.
I can help package the app for ubuntu/debian when it's ready.
Btw, for those people who are visiting this page, I found pre-built shape data here. However, this page only provides country-level. If you want to extract a city or a specific region other than a whole country, the region should be downloaded from overpass api, and converted to shp.
You could just refer to the old Osmium instead of installing the new Osmium libraries https://github.com/joto/osmium Put the include files (and osmium.hpp) from the above in /usr/include $> make then should succeed...
I get this error when I try to compile: