[OSM-dev] osm2pgsql Windows build

Dominik Perpeet dominik.perpeet at gmail.com
Wed Dec 12 18:01:40 GMT 2012

Would anyone be interested in a current osm2pgsql Windows build (Win32 +
x64, both with 32 bit id space)?
In the near future I will link the zipped binary package on the wiki:

I recently needed a Windows version of the program and had to compile
it. Needless to say, it took me a rather large part of an evening to
accomplish. ;-)

Version: b31c660 (git, Oct 28, 2012)
Built using:
    - geos 3.3.5
    - libxml 2.9.0
    - pgsql 9.2.1
    - proj 4.8.0
    - proto_buf 0.1.5
    - zlib 1.2.7

NOT included:
    - gazetteer
    - shell prompt
    - null output
    - libgen
    - pthread (obviously fork() doesn't work on windows and I didn't
want to get into making the code thread-safe)

In order to compile the C99 code, I used the Intel Compiler. I
successfully compiled Win32 and x64 versions and imported current osm
planet pbf's. Mapnik rendering (current version) appears to work fine
with the created databases.
The rather extensive changes and inclusion of dependencies into a
solution prevent me from committing the resulting source. If there is
serious interest, I can cobble together a brief description of what I
did and share my VS2010 solution.

Is anyone against switching to C++ (see osm2pgsql TODO)? In my opinion
it would result in cleaner code and make building on windows a lot
easier. Also, fork() could be replaced with omp if the effects are
sorted out carefully.

Dominik Perpeet

More information about the dev mailing list