3DGI / tyler

Tiling 3D city models encoded in CityJSON
Apache License 2.0
29 stars 4 forks source link

CityObject without geometry member fails to parse #44

Closed AKaliske closed 8 months ago

AKaliske commented 8 months ago

Hello,

I am running into parsing errors on features with children. Other features without children and a geometry-Property work fine.

Acording to the docs this should work, right?

I am using the docker image 3dgi/tyler:0.3.8

Command:

tyler --metadata ./testout/metadata.city.json --features ./testout --output ./test3dtiles-terrain --3dtiles-implicit --object-type BuildingPart --object-type Building --3dtiles-metadata-class terrain

Example Data: testout.zip

Log:

[2023-12-07T16:05:31Z DEBUG tyler] Cli { metadata: "/opt/testout/metadata.city.json", features: "/opt/testout", output: "./test3dtiles-terrain", object_type: Some([BuildingPart, Building]), object_attribute: None, cesium3dtiles_metadata_class: Some("terrain"), cesium3dtiles_implicit: true, cesium3dtiles_tileset_only: false, cesium3dtiles_content_bv_from_tile: false, cesium3dtiles_content_add_bv: false, geometric_error_above_leaf: Some(12.0), grid_cellsize: Some(250), grid_file: None, grid_minz: None, grid_maxz: None, grid_export: false, grid_export_features: false, debug_load_data: None, qtree_capacity: Some(42000), exe_geof: None, reduce_vertices: Some(0.05), timeout: None, lod_building: None, lod_building_part: None, lod_building_installation: None, lod_tin_relief: None, lod_road: None, lod_railway: None, lod_transport_square: None, lod_water_body: None, lod_plant_cover: None, lod_solitary_vegetation_object: None, lod_land_use: None, lod_city_furniture: None, lod_bridge: None, lod_bridge_part: None, lod_bridge_installation: None, lod_bridge_construction_element: None, lod_tunnel: None, lod_tunnel_part: None, lod_tunnel_installation: None, lod_generic_city_object: None, color_building: None, color_building_part: None, color_building_installation: None, color_tin_relief: None, color_road: None, color_railway: None, color_transport_square: None, color_water_body: None, color_plant_cover: None, color_solitary_vegetation_object: None, color_land_use: None, color_city_furniture: None, color_bridge: None, color_bridge_part: None, color_bridge_installation: None, color_bridge_construction_element: None, color_tunnel: None, color_tunnel_part: None, color_tunnel_installation: None, color_generic_city_object: None }
[2023-12-07T16:05:31Z INFO  tyler] tyler version: 0.3.8
[2023-12-07T16:05:31Z DEBUG tyler] exe_geof is not set for generating 3D Tiles, defaulting to 'geof' in the filesystem PATH
[2023-12-07T16:05:31Z INFO  tyler] geof version:
    Geoflow 0.3.6
    compiled with GNU v12.2.0 (Release)
    Loaded /usr/local/lib/geoflow-plugins/gfp_las.so
    Loaded /usr/local/lib/geoflow-plugins/gfp_core_io.so
    Loaded /usr/local/lib/geoflow-plugins/gfp_gdal.so
    Loaded /usr/local/lib/geoflow-plugins/gfp_val3dity.so
    Loaded /usr/local/lib/geoflow-plugins/gfp_buildingreconstruction.so
    GF_PLUGIN_FOLDER = /usr/local/lib/geoflow-plugins
     > io-gdal 0.3.1
       compiled with GNU v12.2.0 (Release)
     > Val3dity 0.3.0
       compiled with GNU v12.2.0 (Release)
     > CoreIO 0.3.8
       compiled with GNU v12.2.0 (Release)
     > io-las 0.3.1
       compiled with GNU v12.2.0 (Release)
     > building-reconstruction 0.3.6
       compiled with GNU v12.2.0 (Release)
     > Core [built-in]

[2023-12-07T16:05:31Z DEBUG tyler] SubprocessConfig { output_extension: "glb", exe: "geof", script: "/usr/src/tyler/resources/geof/createGLB.json", timeout: None }
[2023-12-07T16:05:31Z WARN  tyler] PROJ_DATA environment variable is not set
[2023-12-07T16:05:31Z DEBUG tyler] DebugData { world: None, quadtree: None, tiles_results: None }
[2023-12-07T16:05:31Z INFO  tyler::parser] Computing extent from the features of type Some([BuildingPart, Building])
[2023-12-07T16:05:31Z DEBUG tyler::parser] Found 1 subdirectories and 0 CityJSONFeature files at the root directory
[2023-12-07T16:05:31Z WARN  tyler::parser] Failed to parse "/opt/testout/testfeatures/testfeature.city.jsonl"
[2023-12-07T16:05:31Z WARN  tyler::parser] Failed to parse "/opt/testout/testfeatures/testfeature.city.jsonl"
thread 'main' panicked at 'Did not find any CityJSONFeature of type Some([BuildingPart, Building]) in /opt/testout', src/parser.rs:109:17
stack backtrace:
   0:     0x55f176a77f81 - std::backtrace_rs::backtrace::libunwind::trace::he648b5c8dd376705
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x55f176a77f81 - std::backtrace_rs::backtrace::trace_unsynchronized::h5da3e203eef39e9f
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55f176a77f81 - std::sys_common::backtrace::_print_fmt::h8d28d3f20588ae4c
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x55f176a77f81 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd9a5b0c9c6b058c0
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x55f176aa0d5f - core::fmt::rt::Argument::fmt::h0afc04119f252b53
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/fmt/rt.rs:138:9
   5:     0x55f176aa0d5f - core::fmt::write::h50b1b3e73851a6fe
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/fmt/mod.rs:1094:21
   6:     0x55f176a75067 - std::io::Write::write_fmt::h184eaf275e4484f0
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/io/mod.rs:1714:15
   7:     0x55f176a77d95 - std::sys_common::backtrace::_print::hf58c3a5a25090e71
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x55f176a77d95 - std::sys_common::backtrace::print::hb9cf0a7c7f077819
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x55f176a792c3 - std::panicking::default_hook::{{closure}}::h066adb2e3f3e2c07
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:269:22
  10:     0x55f176a79054 - std::panicking::default_hook::h277fa2776900ff14
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:288:9
  11:     0x55f176a79849 - std::panicking::rust_panic_with_hook::hceaf38da6d9db792
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:705:13
  12:     0x55f176a79747 - std::panicking::begin_panic_handler::{{closure}}::h2bce3ed2516af7df
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:597:13
  13:     0x55f176a783e6 - std::sys_common::backtrace::__rust_end_short_backtrace::h090f3faf8f98a395
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/sys_common/backtrace.rs:151:18
  14:     0x55f176a79492 - rust_begin_unwind
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:593:5
  15:     0x55f176897e03 - core::panicking::panic_fmt::h4ec8274704d163a3
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:67:14
  16:     0x55f1768f2cd8 - tyler::parser::World::new::heff96254f9c7708f
  17:     0x55f1768bc77b - tyler::main::hc0f013ebb88927a0
  18:     0x55f17690f4e3 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf28faf9ba88e76d9
  19:     0x55f176916969 - std::rt::lang_start::{{closure}}::h38705703ed7aaf13
  20:     0x55f176a6ef3b - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h75ba4244a1c7bb54
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/ops/function.rs:284:13
  21:     0x55f176a6ef3b - std::panicking::try::do_call::h0a2baa36dea975a1
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:500:40
  22:     0x55f176a6ef3b - std::panicking::try::h0e42aa233d4224d4
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:464:19
  23:     0x55f176a6ef3b - std::panic::catch_unwind::hefdfd8f482606434
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panic.rs:142:14
  24:     0x55f176a6ef3b - std::rt::lang_start_internal::{{closure}}::h457959f0f91da23b
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/rt.rs:148:48
  25:     0x55f176a6ef3b - std::panicking::try::do_call::h112cfd1acb38183b
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:500:40
  26:     0x55f176a6ef3b - std::panicking::try::ha64f15b20cec18ca
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:464:19
  27:     0x55f176a6ef3b - std::panic::catch_unwind::hbacc2b68ee2c119e
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panic.rs:142:14
  28:     0x55f176a6ef3b - std::rt::lang_start_internal::h5f408694586c2a05
                               at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/rt.rs:148:20
  29:     0x55f1768c7dd5 - main
  30:     0x7f02872cda90 - <unknown>
  31:     0x7f02872cdb49 - __libc_start_main
  32:     0x55f176898565 - _start
  33:                0x0 - <unknown>
balazsdukai commented 8 months ago

The case when a CityObject doesn't have a geometry member is not handled, so that's what gives the parsing error. The parent object in the data "DESLT5850A40A94A" is the one without geometry.

balazsdukai commented 8 months ago

The fix is in the release 0.3.9