-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subset operation fails when used on a filtered file #183
Comments
It should work either way. Can you provide the file, or a subset of it so that I can reproduce the bug? Is it the 3dbag? |
This is the subset that breaks things when the order is not followed! |
okay so I can reproduce this bug with any 3dbag.nl files. Both functions are okay and work, this is the good news. The reason nothing is returned is that if you We decided a while ago that the subset operator should not include the parents of selected city objects (https://github.com/cityjson/cjio/blob/develop/cjio/subset.py#L8), only the children of the selected ones. This was to avoid adding the parents if one ID of a BuildingPart is selected for instance: we cannot add only the child since we would create invalid files (a CityObject having a parent must have its parent in the file), and we thought that including the parents was somehow not the behaviour we wanted. But clearly your example breaks this, so I am not sure what we should do. @balazsdukai any thoughts? |
In case of spatial subsets the whole hierarchy should be included for a CityObject. |
cjio <myfile> subset --radius <sx> <sy> <radius> save <outfile>
The above command returns an empty file when is obtained from
cjio <oldfile> lod_filter 2.2 save <myfile>
However, if I use the original file containing the entire dataset and then use the subset operation it returns the right result. A bit puzzeled as to why this is the case. I would have expected it to work eitherway, but perhaps I misunderstood something. Perhaps the right order of using cjio would be to
What I used that returns empty data
cjio version
cjio version 2.0
To Reproduce
Steps detailed above
Expected behavior
I was expecting that that since the subset operation yanks the chunk that is of interest it should have worked irrespective of the contents of the file. However, it seems that subset operations can only work on the original file with all the contents and do not work when a filtered file is used as shown above.
Screenshots
NA
Desktop (please complete the following information):
Additional context
NA
The text was updated successfully, but these errors were encountered: