Hi.

Yep, another post about osm2pgsql in a short interval.

I've managed to convert the Iceland extract I got from geofabrik into a
postgis database. There's however a snag. It seems like not all of the
data ended up in the correct tables.

The line I used to import the data:
osm2pgsql -d osm --cache-strategy sparse -S
/[workdir]/osm/mapnik-stylesheets/default.style --prefix osm --slim
iceland.osm
* Some of the path replaced with [workdir].
* The import log follows as an attachment.

Many municipalities went into osm_rels while the others went into
osm_polygon. The municipalities are all defined with type=boundary and
admin_level=6. I didn't see anything obvious which might cause osm2pgsql
to categories them differently.

Kind of the same thing happens with some of the suburbs in Reykjavík
since most of them ended up in osm_polygon, but not all.

You can see it on
http://osm.is/?zoom=11&lat=64.10315&lon=-21.82199&layers=B000FTF . The
area should mostly be filled with a transparent(ish) blue layer. You can
see the desired effect on
http://layers.openstreetmap.fr/?zoom=11&lat=64.10315&lon=-21.82199&layers=B00FFFFFFFFFFTFFFFFFFFF
.

SELECT name, admin_level,boundary FROM osm_polygon WHERE admin_level = '6'
name    admin_level     boundary
Álftanes        6       administrative
Seltjarnarnes   6       administrative
Kópavogur       6       administrative
Hrísey  6       administrative
Hríseyjarhreppur        6       administrative


The top 3 municipalities in the table are in the capital area in
Iceland. The ones that should be there too are Hafnarfjörður, Garðabær,
Reykjavík and Mosfellsbær.

The table parameter in the stylesheet file (in case someone asks):
(select way,name from osm_polygon where boundary='administrative' and
admin_level='6' ) as admin

Is there a osm2pgsql parameter I'm missing in the import or some other
apparent implementation fault of mine?

With regards,
Svavar Kjarrval
osm2pgsql SVN version 0.81.0 (64bit id space)

Using projection SRS 900913 (Spherical Mercator)
Setting up table: osm_point
NOTICE:  table "osm_point_tmp" does not exist, skipping
Setting up table: osm_line
NOTICE:  table "osm_line_tmp" does not exist, skipping
Setting up table: osm_polygon
NOTICE:  table "osm_polygon_tmp" does not exist, skipping
Setting up table: osm_roads
NOTICE:  table "osm_roads_tmp" does not exist, skipping
Allocating memory for sparse node cache
Node-cache: cache=800MB, maxblocks=102401*8192, allocation method=9
Mid: pgsql, scale=100 cache=800
Setting up table: osm_nodes
NOTICE:  table "osm_nodes" does not exist, skipping
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "osm_nodes_pkey" for table "osm_nodes"
Setting up table: osm_ways
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "osm_ways_pkey" for table "osm_ways"
Setting up table: osm_rels
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "osm_rels_pkey" for table "osm_rels"

Reading in file: iceland.osm
Processing: Node(1147k 63.8k/s) Way(101k 5.99k/s) Relation(2381 198.42/s)  parse time: 47s

Node stats: total(1147968), max(2076135241) in 18s
Way stats: total(101787), max(197363513) in 17s
Relation stats: total(2381), max(2649305) in 12s
Committing transaction for osm_point
Committing transaction for osm_line
Committing transaction for osm_polygon
Committing transaction for osm_roads

Going over pending ways...
	55140 ways are pending

Using 1 helper-processes
Process 0 finished processing 55140 ways in 46 sec

All child processes exited

55140 Pending ways took 46s at a rate of 1198.70/s
Committing transaction for osm_point
Committing transaction for osm_line
Committing transaction for osm_polygon
Committing transaction for osm_roads

Going over pending relations...
	0 relations are pending

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

All child processes exited

Sorting data and creating indexes for osm_point
Sorting data and creating indexes for osm_line
Sorting data and creating indexes for osm_polygon
node cache: stored: 1147968(100.00%), storage efficiency: 50.00% (dense blocks: 0, sparse nodes: 1147968), hit rate: 98.10%
Sorting data and creating indexes for osm_roads
Stopping table: osm_nodes
Stopping table: osm_ways
Stopping table: osm_rels
Building index on table: osm_ways (fastupdate=off)
Building index on table: osm_rels (fastupdate=off)
Stopped table: osm_nodes in 0s
Stopped table: osm_rels in 0s
Analyzing osm_roads finished
Copying osm_roads to cluster by geometry finished
Creating indexes on  osm_roads finished
All indexes on  osm_roads created  in 2s
Completed osm_roads
Analyzing osm_point finished
Analyzing osm_polygon finished
Analyzing osm_line finished
Copying osm_point to cluster by geometry finished
Copying osm_polygon to cluster by geometry finished
Copying osm_line to cluster by geometry finished
Creating indexes on  osm_polygon finished
All indexes on  osm_polygon created  in 8s
Completed osm_polygon
Creating indexes on  osm_point finished
Creating indexes on  osm_line finished
All indexes on  osm_point created  in 10s
Completed osm_point
All indexes on  osm_line created  in 11s
Completed osm_line
Stopped table: osm_ways in 16s

Osm2pgsql took 113s overall

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

Reply via email to