[OSM-dev] osm2pgsql Windows build

Jukka Rahkonen jukka.rahkonen at latuviitta.fi
Fri Dec 14 07:59:52 GMT 2012


Frederik Ramm wrote:
> Hi,
>
> On 13.12.2012 19:04, Dominik Perpeet wrote:
>> I would be willing to refactor the code into C++ classes.
>> Once the connection variables are a bit more concentrated, it wouldn't
>> affect fork() and other threading systems could be implemented.
>
> osm2pgsql is a very versatile beast and used by many people for many
> things. And it has very few tests. In my head a few warning lights come
> up if I hear "refactor" in this context ;)
>
> I guess it depends on what exactly you'll be touching and whether you
> can manage to refactor structure without changing function. Off the top
> of my head, the following are widely used:
>
> * normal imports, slim and non-slim
> * "gazetteer" imports for Nominatim
> * writing of "dirty tile" lists
> * diff imports for normal and gazetteer databases
> * rather complex polygon building code
>
> I'm sure there are more. All these should ideally not only not break,
> but also not become slower ;)
>
> Maybe we should get our act together and write a couple of tests that
> ensure all this still works as expected. We've been planning that for a
> long time but never got very far.
>
> (It is possible that the "normal" (i.e. non-slim) imports need not be
> supported any more because slim imports are now quicker than before.)

Also because at least on my Windows computers GDAL is so much faster for
doing pretty much the same than the osm2pgsql "normal-slim" alternative is
doing. However, I do not know if any OSM developer has made speed
comparisons and my experience about GDAL being two times faster with
country extracts (Finland, Germany, UK) may be true only in my
environment.

-Jukka Rahkonen-


> There's also ongoing work at supporting a MySQL database instead of
> PostGIS, here: https://github.com/hholzgra/osm2pgsql - any refactoring
> would likely affect/benefit that work as well and it might make sense to
> talk to Hartmut about it.
>
> Bye
> Frederik
>
> --
> Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>





More information about the dev mailing list