[OSM-dev] osm2pgsql completely autotoolized, primitive parser integrated ...

Hartmut Holzgraefe hartmut at php.net
Mon Oct 25 18:15:36 BST 2010

I've now taken my autotools work on osm2pgsql another step further
(beyond the patch that i already had published on 
http://trac.openstreetmap.org/ticket/3258 ),

the current code, as it is available on


now also integrates both the libxml2 based and the primitive XML
parser into the same binary by making streamFile a function pointer
that points to either of the two implementations depending on the
--input-reader command line option (with the libxml2 based parser
still being the default)

As part of the changes i've created a new data structure

   struct osmdata_t

which now bundles most of the previous global variables from
osm2pgsql.c and is now used to pass context down to the
streamFile handler and its helper functions.

Based on this adding additional parsers, e.g. a pdf2osm based
PBF parser, should now be possible by adding yet another
streamFile implementation ...


More information about the dev mailing list