Hi I tried to use the described way to keep a AOI (area of interest)
OSM-file up to date. The following errors or unexpected behaviour occured:
1. downloaded planetfile (planet-100120.osm.bz2)
2. osmosis (0.32) with --bp completeWays=yes and completeRelations=yes
to cut out myAOI
3. downloaded daily-diffs (20100120-20100121.osc, ...)
4. merged the diffs using osmosis => 20100120-20100120.osc
5. applied merged diffs using:
./bin/osmosis --rxc 20100120-20100126.osc --rx aoi-100120.osm.bz2
--ac --bp file=aoi.pff completeWays=yes completeRelations=yes --wx
file=aoi-100126.osm.bz2
6. tried to import both aoi-....osm.bz2 into separate PostgreSQL-DBs
using API-Scheme.
Results:
No Errors: - bzcat ./aoi-100120.osm.bz2 | ./bin/osmosis --rx file=-
--wd database=osmAOI_api_1 host=localhost:5432 user=osmuser password="pass"
Error: - bzcat ./aoi-100126.osm.bz2 | ./bin/osmosis --rx file=- --wd
database=osmAOI_api_2 host=localhost:5432 user=osmuser password="pass"
Error message:
Unable to load current way nodes.
at
org.openstreetmap.osmosis.core.apidb.v0_6.ApidbWriter.complete(ApidbWriter.java:980)
at
org.openstreetmap.osmosis.core.xml.v0_6.XmlReader.run(XmlReader.java:110)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.postgresql.util.PSQLException: ERROR: Insert or Update in
table »current_way_nodes« verletzt foreignkey-Constraint
»current_way_nodes_node_id_fkey«
Detail: key (node_id)=(581918002) does not exist in table »current_nodes«.
The error message says it clear. My workflow to keep aoi.osm.bz2 up to
date seems to produce an "erroneous" aoi.osm.bz2 or at least a osm-file
that differs from a freshly cutted one. I expected that cutting an AOI
from a planetfile should produce the same results than keeping my AOI up
to date by applying planet*.osc and cutting these back to myAOI.
Before trying to:
bzcat ./aoi-100120.osm.bz2 | ./bin/osmosis --rx file=- --wd
database=osmAOI_api_1 host=localhost:5432 user=osmuser password="pass"
./bin/osmosis --rxc 20100120-20100126.osc --rd database=osmAOI_api_1
host=localhost:5432 user=osmuser password="pass" --ac --bp file=aoi.pff
completeWays=yes completeRelations=yes --wd database=osmAOI_api_1
host=localhost:5432 user=osmuser password="pass"
will this keep my apiDB of an AOI up to date?
Marco
P.S. I'm not sure if this is more or less a user-question and therefore
using the wrong list, but I guess it moves quite next to the
feature-wish section.
Lennard schrieb:
> Marco Lechner - FOSSGIS e.V. wrote:
>
>
>> Otheriwse I have to apply the diff onto a planetfile and cut it everyday
>> or apply the planet diff to ma AOI.osm and cut it afterwards.
>> Is this a proper workflow?
>> Or what ist the best task to keep an AOI.osm (cutted by osmosis using
>> --bp) up-to-date?
>>
>
> Apply the diffs first, then pass it through the --bp task before writing
> it out again:
>
> osmosis --rxc 20100127-20100128.osc.gz --rx AIO-20100127.osm --ac --bp
> file=/path/to/your/polygon/file --wx AIO-20100128.osm
>
>
_______________________________________________
osmosis-dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/osmosis-dev