Hi! I found the source code of osmconvert in the following page: http://m.m.i24.cc/osmconvert.c
However, there seems to be something special about this script. Normally, C is written in separate files while linked with headers. It is very difficult to find a C script with over 10000 lines.
What is more peculiar is that the term 'module' is used, which is a Python concept. There is nothing called 'module' in C. Therefore, I am suggesting that it is originally written in Python, and then translated to C. If that is the case, can the developer please open the Python source code and the way to translate Python to C? Thanks.
P.S. The new version of osmconvert does not write object visibility. Is that a bug?
Yes, this is pure C and definitely not something translated from Python. Like pretty much any programming language from the last 50 years, C supports modularization, it just doesn't have a keyword called "module". Being the huge monolithic source that it is, osmconvert (or rather its author) doesn't seem to be all that fond of this module concept which makes it hard to understand and change indeed. By modularizing it and using the standard library plus some external XML library, it culd probably be cut down by a large amount.
I'm afraid I have no idea about the visibility issue, it looks like that's simply not yet supported.
answered 15 Mar, 04:05