User:Haribo/Auswertungen

From OpenStreetMap Wiki
Jump to: navigation, search

Installation

 sudo apt-get install postgresql postgresql-contrib postgis postgresql-9.3-postgis-2.1
 sudo -u postgres createuser gisuser
 sudo -u postgres createdb --encoding=UTF8 --owner=gisuser gis
 sudo -u postgres psql -d gis -f /usr/share/postgresql/9.3/contrib/postgis-2.1/postgis.sql
 sudo -u postgres psql -d gis -f /usr/share/postgresql/9.3/contrib/postgis-2.1/spatial_ref_sys.sql
 sudo -u postgres psql -d gis -f /usr/share/postgresql/9.3/contrib/postgis-2.1/postgis_comments.sql
 sudo -u postgres psql -d gis -c "GRANT SELECT ON spatial_ref_sys TO PUBLIC;"
 sudo -u postgres psql -d gis -c "GRANT ALL ON geometry_columns TO gisuser;"
 sudo -u postgres psql --username=gisuser --dbname=gis --command="\d"
 sudo gedit /etc/postgresql/9.3/main/pg_hba.conf
 sudo -u postgres /usr/lib/postgresql/9.3/bin/pg_ctl reload
 sudo -u postgres /etc/init.d/postgresql reload
 sudo -u postgres psql --username=gisuser --dbname=gis --command="\d"

Import

System

Intel(R) Core(TM) i3 CPU M 350 @ 2.27GHz, 4GB RAM Ubuntu 14.04.01 LTS auf 320GB WD MyPassport via USB2.0

Log 2014-09-04

haribo@ubuntu-usb:~$ osm2pgsql -s -U gisuser -d gis ~/Downloads/germany-latest.osm.pbf 
osm2pgsql SVN version 0.82.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
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=800MB, maxblocks=102401*8192, allocation method=11
Mid: pgsql, scale=100 cache=800
Setting up table: planet_osm_nodes
NOTICE:  table "planet_osm_nodes" does not exist, skipping
Setting up table: planet_osm_ways
NOTICE:  table "planet_osm_ways" does not exist, skipping
Setting up table: planet_osm_rels
NOTICE:  table "planet_osm_rels" does not exist, skipping

Reading in file: /home/haribo/Downloads/germany-latest.osm.pbf
Processing: Node(185221k 89.1k/s) Way(894k 0.13k/s) Relation(0 0.00/s)
Processing: Node(185221k 89.1k/s) Way(28959k 0.46k/s) Relation(418710 7.55/s)  parse time: 119990s

Node stats: total(185221269), max(3059932567) in 2079s
Way stats: total(28959285), max(301840889) in 62429s
Relation stats: total(418712), max(4011658) in 55482s
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads

Going over pending ways...
	19926716 ways are pending

Using 1 helper-processes
Helper process 0 out of 1 initialised          
Process 0 finished processing 19926716 ways in 63690 sec

All child processes exited

19926716 Pending ways took 63691s at a rate of 312.87/s
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads

Going over pending relations...
	0 relations are pending

Using 1 helper-processes
Process 0 finished processing 0 relations in 2 sec

All child processes exited
0 Pending relations took 2s at a rate of 0.00/s

Sorting data and creating indexes for planet_osm_line
Sorting data and creating indexes for planet_osm_point
Sorting data and creating indexes for planet_osm_polygon
Sorting data and creating indexes for planet_osm_roads
node cache: stored: 54693620(29.53%), storage efficiency: 52.16% (dense blocks: 5348, sparse nodes: 49690625), hit rate: 33.17%
Stopping table: planet_osm_nodes
Stopping table: planet_osm_ways
Building index on table: planet_osm_ways (fastupdate=off)
Stopping table: planet_osm_rels
Stopped table: planet_osm_nodes in 0s
Building index on table: planet_osm_rels (fastupdate=off)
Analyzing planet_osm_roads finished
Copying planet_osm_roads to cluster by geometry finished
Creating geometry index on  planet_osm_roads
Analyzing planet_osm_point finished
Copying planet_osm_point to cluster by geometry finished
Creating geometry index on  planet_osm_point
Stopped table: planet_osm_rels in 1417s
Creating osm_id index on  planet_osm_roads
Creating indexes on  planet_osm_roads finished
All indexes on  planet_osm_roads created  in 1574s
Completed planet_osm_roads
Analyzing planet_osm_line finished
Analyzing planet_osm_polygon finished
Creating osm_id index on  planet_osm_point
Creating indexes on  planet_osm_point finished
All indexes on  planet_osm_point created  in 5499s
Completed planet_osm_point
Copying planet_osm_line to cluster by geometry finished
Creating geometry index on  planet_osm_line
Creating osm_id index on  planet_osm_line
Creating indexes on  planet_osm_line finished
All indexes on  planet_osm_line created  in 14354s
Completed planet_osm_line
Copying planet_osm_polygon to cluster by geometry finished
Creating geometry index on  planet_osm_polygon
Creating osm_id index on  planet_osm_polygon
Creating indexes on  planet_osm_polygon finished
All indexes on  planet_osm_polygon created  in 34911s
Completed planet_osm_polygon
Stopped table: planet_osm_ways in 71426s

Osm2pgsql took 255152s overall (~70,87h, ~2,95d)