-
Notifications
You must be signed in to change notification settings - Fork 19
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
possible to merge cityGml files? #36
Comments
Hi @pcace, citygml-tools currently only offers a Personally, I would write my own small program with citygml4j to merge files at the moment. Or use a tool like the 3DCityDB to import mutliple files into a database and get whatever I want back out of it. But yes, why not add a |
Hi, yes i am looking for a way to simply merge multiple files into one. currently i am trying to merge cityGML tiles to in the end convert them into one glb file. wich kind of works but i keep on messing up the projection and not really know what i am doing wrong. i tried to merge them after converting to cityJson with cjio, but have no luck with the projection (cityjson/cjio#154) so i thought it might be a better solution to do the merging earlier in the process using citygml-tools. |
I would also like to have a merge function as mentioned above: merge all the files into one large files. More and more cities release their datasets with many many small files with a few buildings, so being able to create a dataset in one shot would be useful. |
I just merged the CityGML LoD3 of Ingolstadt with cjio 'merge' operator and here's the script (mostly because I will remember where to look for it ;)) import os
import glob
#-- citygml-tools
cmd1 = '/Users/hugo/software/citygml-tools-2.3.0/citygml-tools'
cmd2 = 'to-cityjson'
fs = glob.glob('./citygml-dataset/*/*.xml')
for f in fs:
a = " ".join([cmd1, cmd2, f])
# print(a)
os.system(a)
# #-- merge with cjio
fs = glob.glob('./citygml-dataset/*/*.json')
cmd3 = 'cjio'
cmd4 = fs[0]
a = " ".join(['cjio', fs[0], 'merge', "'./citygml-dataset/*/*.json'", 'save', 'merged.city.json'])
os.system(a) |
Thanks for your feedback, @hugoledoux. Merging just the XML / JSON is pretty straight-forward, I guess (one might run into duplicate ID issues if the input datasets were created without caring about IDs). But how do you handle texture images and relative paths to those images in your |
hmmm, actually I keep the original paths, which is wrong :\ I'll open an issue in cjio. We offer operators to update the paths of textures, but indeed we should normalise the paths, at least... |
Hi,
is there any way to merge cityGML files with citygml-tools? or what would be the way to go here?
Thanks a lot!
The text was updated successfully, but these errors were encountered: