[osmosis-dev] nodes column in way table and way_nodes table
Michel Seuthe
m.seuthe at googlemail.com
Sun Dec 25 14:43:40 GMT 2011
Ya, I used a similar statement. It took a few hours to build the
linestrings for germany.
I tried to use osmosis to build the geometries, but it always threw
SystemOutOfMemory Exception when the linestring column was added to ways
table. The box osmosis was running on got 16GB RAM and I used InMemory
option.
Don't know what i did wrong.
Cheers, merry xmas.
2011/12/24 Brett Henderson <brett at bretth.com>
> On 23 December 2011 00:09, Michel Seuthe <m.seuthe at googlemail.com> wrote:
>
>> I got a question left... If i add the linestring-column to the ways table
>> _after_ I imported all the data, is there a way to fill this column without
>> re-import everything?
>>
>
> Yes in theory, no in practice.
>
> Technically it's as simple as running this statement (it's in the
> pgsnapshot_load_0.6.sql script).
> UPDATE ways w SET linestring = (
> SELECT ST_MakeLine(c.geom) AS way_line FROM (
> SELECT n.geom AS geom
> FROM nodes n INNER JOIN way_nodes wn ON n.id = wn.node_id
> WHERE (wn.way_id = w.id) ORDER BY wn.sequence_id
> ) c
> );
>
> However for large datasets it is horrendously slow. It is usually much
> faster to get Osmosis to do it, especially if you have enough RAM to use
> the nodeLocationStoreType=InMemory option on the --write-pgsql or
> --write-pgsql-dump task.
>
> The raw data load is relatively fast. Building indexes and running
> CLUSTER statements consumes most of the time.
>
> Brett
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20111225/1ee90544/attachment.html>
More information about the osmosis-dev
mailing list