cityjson / cjio

CityJSON/io: Python CLI to process and manipulate CityJSON files
MIT License
119 stars 31 forks source link

Merging multiple files in folder fails in windows #170

Open Mboga opened 1 year ago

Mboga commented 1 year ago

Describe the bug Running the merge command on a list of files in a folder fails in windows. The output of the command is a warning that there are no files to merge. However, the same command runs successfully in linux.

cjio model.city.json merge "'./test/*.city.json'" save test_58m.city.json

cjio v0.8.1; supports CityJSON v1.1 Windows 10

hugoledoux commented 1 year ago

I don't have windows to test, but could you try with backslashes and not use a relative path?

cjio model.city.json merge "C:\temp\*.city.json" save test_58m.city.json
Mboga commented 1 year ago

Thank you for your reply: I have four files to merge ''tile_58_2.city.json,tile_58_3.city.json,tile_58_4.city.json,tile_58_5.city.json" When I run this on windows, I get an error:

cjio model.city.json merge "C:\temp\tile_58_post*.city.json" save test_58m.city.json Usage: cjio [OPTIONS] INPUT COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]... Try 'cjio --help' for help.

Error: No such command 'C:\temp\tile_58_post\tile_58_5.city.json'.

hugoledoux commented 1 year ago

sorry single quotes then + not sure we resolves with tile_58_post as prefix... try just *.json?

cjio model.city.json merge 'C:\temp\*.city.json' save test_58m.city.json
Mboga commented 1 year ago

Thanks for your reply I have tried *.json in the first test. Sorry tile_58_post was a typo when writing in the comment section. It is the folder that contains the individual .city.json files to be merged. Thank you

cjio model.city.json merge 'C:\temp\tile_58_post\tile_58_post\*.json' save test_58m.city.json Parsing model.city.json Merging files WARNING: No files to merge. Saving CityJSON to a file C:\temp\tile_58_post\test_58m.city.json

cjio model.city.json merge 'C:\temp\tile_58_post\*.city.json' save test_58m.city.json Parsing model.city.json Merging files WARNING: No files to merge. Saving CityJSON to a file C:\temp\test_58m.city.json

cjio model.city.json merge "'C:\temp\tile_58_post\tile_58_post\*.json'" save test_58m.city.json Parsing model.city.json Merging files WARNING: No files to merge. Saving CityJSON to a file C:\temp\test_58m.city.json``

hugoledoux commented 1 year ago

okay, clearly something is wrong with Windows, I'll try to find a Windows machine and fix this!

dezemberwxnd commented 1 week ago

Has there been a fix to this issue yet? Seeing that this issue is still open, i figure that there is not. Is there any workaround or a system on which this works? kind regards and thank you in advance for anyone answering :)