[OSM-dev] osm2pgsql Windows build
frederik at remote.org
Thu Dec 13 22:08:06 GMT 2012
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.)
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.
Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
More information about the dev