0

Context

I would like to speedup a cython function where I read an osm.pbf file via pyrosm.

In this library, the file is read via pyrobuf prototypes: pyrobuf generates a .c file with the relevant classes and their ParseFromString functions.

However, in the .pyx file, these classes are imported via python, which (I imagine), slows things down when they are called (repeatedly, within a loop).

Question(s)

Is there a way to tell pyrobuf to generate a .pxd file associated to the .c file so I can cimport everything? If not, is there a simple way to autogenerate a .pxd from a random .c file?

Silmathoron
  • 1,781
  • 1
  • 15
  • 32
  • 1
    This will not answer your question directly, but it seems pyrosm has fallen asleep as there is no activity for more than one year by now. Take a look at https://pyogrio.readthedocs.io instead to import osm.pbf files.. – CaptainInler Aug 16 '23 at 15:50

0 Answers0