[OSM-dev] Osmosis and Postgresql
Emilie Laffray
emilie.laffray at gmail.com
Fri Jun 19 22:56:52 BST 2009
Graham Jones wrote:
> Hi Folks,
> I have spent a couple of evenings trying to persuade osmosis to import
> a planet dump into postgresql.
>
> It was quite a lot harder than I expected because of the need to set
> up the database schema, postgis etc. first (I am not used to
> postgresql, which was a lot of the problem).
>
> I have had a go at drafting a procedure for setting this up for the
> first time at:
> http://wiki.openstreetmap.org/wiki/Talk:Osmosis#Procedure_to_import_data_into_PostGreSQL
>
> Would someone that know more about this than me mind having a look and
> pointing out my mistakes please? Once it is right I'll add it as a
> separate wiki page rather than hiding it in the 'talk' bit.
Hello,
I have just had a look at what you have written. It looks good to me. I
usually do not use the task to write directly into postgres and instead
I generate the pgsql dump and import them later on. Based on experience,
it is just faster. If you do that, you have to add an extra step which
is found in the load script provided also with Osmosis.
Also, because I don't like not to know what is happening, I add some
logging to see what the program is doing.
In addition, the import information that you have given do not take into
account the optional columns for bboxbuilder and linestringbuilder,
which can be useful for some people. We may want to add a comment about
those options.
Other than that, your instructions are a pretty good to get started.
One quick note, you are installing postgres contrib but you are not
making use of any of the scripts that are present inside contrib. One of
the useful script is the admin script especially if you are using pgadmin.
Emilie Laffray
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090619/77c275c2/attachment.pgp>
More information about the dev
mailing list