这是我第一次尝试build立一个OSM服务器。 我一直在关注这个教程:
https://github.com/AnderPijoan/vectorosm (与节点,为什么我需要改变地图如何呈现我的项目的一些特定要求)。
我做了一切,除了我从源安装osm2pgsql为什么版本库太旧。
但我卡在数据库的导入,我用:
osm2pgsql -m -s -c -j -v --cache-strategy dense --flat-nodes tempFileErase -d osm -U osmuser --unlogged --hstore-add-index --exclude-invalid-polygon -r pbf planet-latest.osm.pbf
但我得到:
osm2pgsql SVN version 0.83.0 (64bit id space) Using projection SRS 900913 (Spherical Mercator) Setting up table: planet_osm_point NOTICE: table "planet_osm_point" does not exist, skipping NOTICE: table "planet_osm_point_tmp" does not exist, skipping Setting up table: planet_osm_line NOTICE: table "planet_osm_line" does not exist, skipping NOTICE: table "planet_osm_line_tmp" does not exist, skipping Setting up table: planet_osm_polygon NOTICE: table "planet_osm_polygon" does not exist, skipping NOTICE: table "planet_osm_polygon_tmp" does not exist, skipping Setting up table: planet_osm_roads NOTICE: table "planet_osm_roads" does not exist, skipping NOTICE: table "planet_osm_roads_tmp" does not exist, skipping Using built-in tag processing pipeline Allocating memory for dense node cache Allocating dense node cache in one big chunk Node-cache: cache=800MB, maxblocks=0*102401, allocation method=8192 Mid: loading persistent node cache from tempFileErase Failed to allocate space for node cache file: Success Error occurred, cleaning up
任何想法如何我可以修复它?
问候。
尝试从命令中删除--cache-strategy dense 。 这对我有效。