citygml4j / citygml-tools

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

Java Permissions Error under WSL2 #32

Closed SfCal closed 1 year ago

SfCal commented 1 year ago

Hi, I am working on trying to convert NYC CityGML data into CityJSON. I'm doing this all within a WSL2 VM on my windows desktop. Originally I was using the docker container but ran into the same error messages as below. The files appear valid using the validate command and the files themselves have completely open permissions. This leads me to believe that perhaps there is some error when running the tool under WSL?

sfcal@win_desktop:~/DA_WISE_GML/DA_WISE_GMLs$ citygml-tools to-cityjson DA12_3D_Buildings_Merged.gml
[12:26:22 INFO] Starting citygml-tools.
[12:26:22 INFO] Executing 'to-cityjson' command.
[12:26:22 INFO] Found 1 file(s) at DA12_3D_Buildings_Merged.gml.
[12:26:22 INFO] [1|1] Processing file /home/sfcal/DA_WISE_GML/DA_WISE_GMLs/DA12_3D_Buildings_Merged.gml.
[12:26:28 WARN] The input file uses unsupported non-CityGML namespace(s): http://www.citygml.org/citygml/profiles/base/1.0, http://www.w3.org/2001/SMIL20/Language, http://www.w3.org/2001/SMIL20/, http://www.ascc.net/xml/schematron.
[12:26:28 INFO] Non-CityGML content is skipped unless a matching ADE extension has been loaded.
[12:26:28 INFO] Writing output to file /home/sfcal/DA_WISE_GML/DA_WISE_GMLs/DA12_3D_Buildings_Merged.json.
[12:26:28 ERROR] Failed to create CityJSON writer.
[12:26:28 ERROR] org.citygml4j.cityjson.writer.CityJSONWriteException: Caused by:
[12:26:28 ERROR] java.nio.file.AccessDeniedException: /home/sfcal/DA_WISE_GML/DA_WISE_GMLs/DA12_3D_Buildings_Merged.json
[12:26:28 WARN] citygml-tools execution failed.
clausnagel commented 1 year ago

I tested with my WSL2 Ubuntu machine and couldn't reproduce the issue. I can successfully convert my CityGML file to CityJSON.

image

Are you sure you have sufficient write permissions for /home/sfcal/DA_WISE_GML/DA_WISE_GMLs? Do you also receive errors when you create a file in that directory, for example, with touch test.json?

SfCal commented 1 year ago

@clausnagel I feel silly for not having tried simply touching a file in that directory. You are correct that it didn't work. It ended up being a much deeper issue with my entire WSL install so I don't feel too bad. :)

Thank you for putting my on the right track.