citygml4j / citygml-tools

Collection of tools for processing CityGML files
Apache License 2.0
115 stars 18 forks source link

texture is missing after converting to CityJSON #28

Closed hopezh closed 2 years ago

hopezh commented 2 years ago

I used the following command to convert all the CityGML files in a folder to CityJSON format. However it seems the texture mapping information is not exported at all.

./citygml-tools to-cityjson D:\test_CityGML_files\

May I ask if there is a specific option in the citygmltools command that I need to use to export the texture?

Thanks.

clausnagel commented 2 years ago

Just did a test on my machine with some local test datasets and all appearance information was correctly translated to the CityJSON file. So, no issues here.

Please provide (an excerpt of) your CityGML data to be able to reproduce the issue.

hopezh commented 2 years ago

Thanks, @clausnagel for your reply.

Unfortunately, the CityGML data I'm using is confidential, and I'm unable to provide a sample here.

All I can share is the partial image of one of the CityJSON files obtained with sensitive information replaced by "???".

2022-06-28-11-22-18

What I want to ask is:

  1. Can the texture (and texture mapping info such as which surface to use which texture and by which coordinates) be exported from CityGML to CityJSON using the citygml-tools? (Just like the conversion of CityGML to OBJ files, there will be a materials_textures folder generated to store the texture file used by the current model as shown below)

2022-06-28-14-06-39

  1. If yes, is there any particular option that I need to specify in the command line to achieve this?

Thanks.

clausnagel commented 2 years ago

1: yes 2: no

The original texture files referenced from your CityGML input are reused. So, the creation of an additional "materials_textures" folder is not required.