polygon-city / citygml-to-obj

Takes a CityGML file and creates an OBJ file for each building
MIT License
18 stars 4 forks source link

Number of output buildings differs with every call #10

Closed MFGiscad closed 9 years ago

MFGiscad commented 9 years ago

Hi,

when I execute the Module for the same CityGML file multiple times, it always puts out a different number of files (and fewer than the number of buildings in the GML file in total)!

Sometimes obj files are left out and sometimes others are added.

When I load the obj files in a 3D Editor, some Buildings are missing (as to be expected).

Greets,

Marius

robhawkes commented 9 years ago

Is it possible you have the overwrite: false option set (which it is by default)? This would only add models that failed to convert the previous time (for whatever reason). If you set it to true then it would overwrite all the existing files and add any new ones each time you run the module.

If you're deleting the files or exporting into a new directory and you see a big difference in the output count then this points towards something odd happening.

Another thing that will cause some buildings not to output is if they fail some of the basic geometry validation checks, so that will explain why you may never get all the buildings as OBJ files. However, this number shouldn't change if you ran the module multiple times.

What version of the module are you using? I can run some tests.

Are there any messages of significance in terminal when running the module?

MFGiscad commented 9 years ago
overwrite: true

also i delete the files before running it again,

the terminal just sais "Saved: ..." and "pausing queue"/ "resuming queue" which should be normal and as i mentioned in Issue #11 it sais finished before all files are saved

I am using v0.1.24

edit: 
I just compared 2 of the output folders using WinMerge and I get the following result:
Except for 8 obj files all files are exactly the same,
of that 8, 3 are unique in Folder one and 5 are unique in Folder two
robhawkes commented 9 years ago

Ok thanks for the update, and sorry for the delay. I'm looking into this now – it could be that the something like the callback issue in #11 is causing the final building output to differ each time because not all files get written before the app quits. I'll look at fixing that aspect first (so keep an eye on #11) and we can see how that affects things.

As a general course of action, I'll be looking at how to better track the progress of files through the system so I can see where and why they're going missing.

Edit: I'm able to replicate this locally so I've got a solid base to start debugging from. I'll update as I find out what's happening.

robhawkes commented 9 years ago

I found the issue – there's a queuing system that ensures the workers aren't overloaded and this wasn't being handled correctly on shutdown (leaving an arbitrary number of buildings unprocessed). I've pushed 0.1.26 which fixes this and from the tests I've run locally this spits out a consistent number of files each time.

Let me know how you get on and we can reopen it if the inconsistencies are still occurring.

Thanks for reporting it!