[OSM-dev] PBF parsing frontend for osm2pgsql, tester wanted

Dane Springmeyer dane at dbsgeo.com
Mon Nov 1 16:28:09 GMT 2010


Hartmut,

Great, thanks for your efforts.

> PS: as the code is already a mix of C and C++ files it might make
>    sense to convert the parser, middle and out "plugin" interfaces
>    to C++ classes as well?

+1 on pure C++. I assume we'd only need the protobuf C++ headers then, instead of both the c++ and c?

I Tested on mac os x and it compiles just fine. I've not actually used it yet due to the same error that sven reported:

Using projection SRS 4326 (Latlong)
Input parser `libxml2' not recognised. Should be one of [xml2, primitive, pbf].

In terms of the 'make install' step I noticed I now get a large message:

----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib/osm2pgsql

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

... which looks like the gazetteer:

$ ls /usr/local/lib/osm2pgsql/
gazetteer.la	gazetteer.so

The big bold output message is an OS X thing, but it is new. Was the gazetteer previously compiled by default?

Dane


On Oct 31, 2010, at 4:02 PM, Hartmut Holzgraefe wrote:

> I've extended osm2pgsql to dynamically support different parsing
> frontends and added direct .pbf reading support which is roughly
> based on code heavily inspired by from pbf2osm
> 
> Changes in this branch over osm2pgsql trunk include:
> 
> * configure now properly checks requirements
> 
> * libxml2 based and primitive xml parsing are now both supported
>  by the default build
> 
> * additional frontend for reading .osm.pbf files
> 
> The reading frontend can be selected using the --input-reader=...
> (or -r) command line option. Possible values are 'xml2' (default),
> 'primitive' or 'pbf'.
> 
> The current protobuf-c-0.14 is required to build, older versions
> will not work. Building without PBF support is not possible yet,
> but is on my Todo list.
> 
> Current source is available as
> 
>  http://php-baustelle.de/osm2pgsql-0.70.2.tar.gz
> 
> and a bazaar branch repository is available at
> 
>  https://code.launchpad.net/~hartmut-php/+junk/osm2pgsql-autotools
> 
> So far the status is "works for me" only so i'd like to get some
> testing feedback ...
> 
> PS: as the code is already a mix of C and C++ files it might make
>    sense to convert the parser, middle and out "plugin" interfaces
>    to C++ classes as well?
> 
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev




More information about the dev mailing list