[OSM-dev] Osmosis: Bounding polygon does not support change data as input?

Andreas Kalsch andreaskalsch at gmx.de
Mon Sep 22 00:03:19 BST 2008


Brett Henderson schrieb:
>
>
> On Fri, Sep 19, 2008 at 2:18 AM, Andreas Kalsch <andreaskalsch at gmx.de 
> <mailto:andreaskalsch at gmx.de>> wrote:
>
>     Thank you for your help.
>     The fourth point means that in my planned application I am not
>     going to use OSM database but just a subset of it - so I need kind
>     of trigger which updates my application data from my local OSM
>     database.
>
>     I have tried to do this the way I described, but it still does not
>     work. I described it in another post this morning. Either ...
>
>     osmosis/bin/osmosis --read-xml-change
>     data/osm/20080916-20080917.osc --apply-change --write-mysql
>     host=localhost database=osm_de user=user password=xxx 
>
>
>
>     and ...
>
>     osmosis/bin/osmosis --read-xml-change
>     data/osm/20080916-20080917.osc --read-mysql host=localhost
>     database=osm_de user=root password=qay --apply-change
>     --write-mysql host=localhost database=osm_de user=user password=xxx
>
>     do not work. What is the right syntax?
>
>
> It should be like this (note use of --write-mysql-change).
> osmosis/bin/osmosis --read-xml-change data/osm/20080916-20080917.osc 
> --write-mysql-change host=localhost database=osm_de user=user password=xxx
>
> Note that you can also use the --read-change-interval task which will 
> automate the downloading of change files and eliminate the need for 
> the --read-xml-change task.  You can easily automate this via cron 
> allowing you to use minute changesets if you wish.
> http://wiki.openstreetmap.org/index.php/Osmosis/DetailedUsage#--read-change-interval_.28--rci.29
Does not seem to work:

mesolt11:/home/andi/opw# osmosis/bin/osmosis --read-change-interval --wnc
Sep 22, 2008 12:04:27 AM com.bretth.osmosis.core.Osmosis main
INFO: Osmosis Version 0.29
Sep 22, 2008 12:04:27 AM com.bretth.osmosis.core.Osmosis main
INFO: Preparing pipeline.
Sep 22, 2008 12:04:27 AM com.bretth.osmosis.core.Osmosis main
INFO: Launching pipeline execution.
Sep 22, 2008 12:04:27 AM com.bretth.osmosis.core.Osmosis main
INFO: Pipeline executing, waiting for completion.
Sep 22, 2008 12:04:27 AM 
com.bretth.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-change-interval failed
com.bretth.osmosis.core.OsmosisRuntimeException: Unable to load 
properties from config file ./configuration.txt
    at 
com.bretth.osmosis.core.merge.v0_5.impl.DownloaderConfiguration.loadProperties(DownloaderConfiguration.java:50)
    at 
com.bretth.osmosis.core.merge.v0_5.impl.DownloaderConfiguration.<init>(DownloaderConfiguration.java:35)
    at 
com.bretth.osmosis.core.merge.v0_5.ChangeDownloader.download(ChangeDownloader.java:226)
    at 
com.bretth.osmosis.core.merge.v0_5.ChangeDownloader.run(ChangeDownloader.java:388)
    at java.lang.Thread.run(Thread.java:619)
Sep 22, 2008 12:04:27 AM com.bretth.osmosis.core.Osmosis main
SEVERE: Execution aborted.
com.bretth.osmosis.core.OsmosisRuntimeException: One or more tasks failed.
    at 
com.bretth.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:141)
    at com.bretth.osmosis.core.Osmosis.main(Osmosis.java:55)

I think I was right that
    - --read-change-interval has no args
    - I use --wnc to forward the change stream to nowhere

So I have tested applying a world change set to a small MySQL database - 
Luxemborg. Needs half an hour. So for small subsets you better replace 
the whole database.
>
> Let me know if you have any problems with the --write-mysql-change 
> task, it hasn't been heavily used yet.
>
> Have you looked at PostgreSQL?  Osmosis provides a "pgsql-simple" 
> schema which is very similar to the OSM MySQL schema but doesn't have 
> history tables and uses some geo-spatial extensions.  It is already 
> being used by a couple of people and may be more appropriate depending 
> on your usage.
I haven't tried it yet, because my app will run with MySQL. If there is 
a way to use _one_ connection for both a PostgreSQL and a MySQL 
database, please tell me.




More information about the dev mailing list