On 27 December 2011 08:10, Oon Arfiandwi <[email protected]> wrote: > Hi brett, > > On Wed, Dec 21, 2011 at 5:04 AM, Brett Henderson <[email protected]> wrote: > > On 20 December 2011 03:14, Oon Arfiandwi <[email protected]> wrote: > >> > >> I just try to apply osmosis command below, > >> the problem is: "Caused by: org.postgresql.util.PSQLException: ERROR: > >> relation "schema_migrations" does not exist" > >> > >> I read a solution about schema_migrations relation here: > >> http://forum.openstreetmap.org/viewtopic.php?id=7396 > >> > >> then I change the command to: > >> osmosis --read-xml-change file="asiadiff.osc" --write-pgsql-change > >> database="gis" user="osm" password="x" host="localhost" > >> or > >> osmosis --read-xml-change file="asiadiff.osc" --write-pgsimp-change > >> database="gis" user="osm" password="x" host="localhost" > >> > >> but still no luck, > >> I got another exception: "org.postgresql.util.PSQLException: ERROR: > >> relation "schema_info" does not exist" > >> > >> > >> any other references? > > > > > > How have you created your database? Specifically, which scripts did you > use > > to create the database tables? The OpenStreetMap project has a number of > > different incompatible schemas using PostgreSQL PostGIS extensions all > > optimised for different purposes. > > http://wiki.openstreetmap.org/wiki/List_of_Database_Schemas > > I created database using osm2pgsql, here's the command: > > ./osm2pgsql -S default.style --slim -d gis -C 1024 > --number-processes=1 --cache-strategy=dense asia.osm.bz2 > > how can I update the database which previously created by osm2pgsql? > any reference? >
Perhaps this page will be of some use: http://wiki.openstreetmap.org/wiki/Minutely_Mapnik#Import_Replication_Data In summary, you can use Osmosis to download and merge the replication files, but you need to use osm2pgsql to apply them. > > > > > > If you wish to use the pgsql tasks in Osmosis you will need to use the > > pgsnapshot_*.sql scripts from the scripts directory of the Osmosis > > distribution. More details are available here: > > > http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage#PostGIS_Tasks_.28Snapshot_Schema.29 > > > > or should I drop the existing database, > and setup the new one by following > http://wiki.openstreetmap.org/wiki/Osmosis_PostGIS_Setup ? > so next time I can update my database using Osmosis? > That depends on what you're using the database for (apologies if you've already mentioned it). The osm2pgsql schema stores a subset of the OSM data in a schema suitable for rendering, the Osmosis pgsnapshot provides a complete snapshot of the OSM dataset in a generic schema that isn't suitable for rendering. Brett
_______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

