VCityTeam / py3dtilers

Tilers accepting various input formats (OBJ, 3DCity databases, GeoJson, IFC) and producing 3DTiles tilesets.
GNU Lesser General Public License v2.1
192 stars 52 forks source link

Conflicting CityTiler and CityTemporalTiler db_config_path command line argument #30

Closed DiegoVinasco closed 2 years ago

DiegoVinasco commented 2 years ago

When using the temporal tiler the argparse has two entries for db_config_path:

usage: citygml-tiler-temporal [-h] [--obj [OBJ]] [--loa [LOA]] [--lod1] [--offset [OFFSET [OFFSET ...]]] [--scale [SCALE]] [--crs_in [CRS_IN]]
                              [--crs_out [CRS_OUT]] [--with_texture] [--with_BTH] [--split_surfaces] [--db_config_path DB_CONFIG_PATH [DB_CONFIG_PATH ...]]
                              [--time_stamps TIME_STAMPS [TIME_STAMPS ...]] [--temporal_graph TEMPORAL_GRAPH [TEMPORAL_GRAPH ...]]
                              [db_config_path] [{building,relief,water,bridge}]

A small utility that build a 3DTiles tileset out of data

positional arguments:
  db_config_path        path to the database configuration file
  {building,relief,water,bridge}
                        identify the object type to seek in the database

optional arguments:
  -h, --help            show this help message and exit
  --obj [OBJ]           When defined, also create an .obj model of the features. The flag must be followed by the name of the obj that will be created.
  --loa [LOA]           Creates a LOA when defined. The LOA is a 3D extrusion of polygons. Objects in the same polygon are merged together. Must be followed by
                        the path to directory containing the polygons .geojson
  --lod1                Creates a LOD1 when defined. The LOD1 is a 3D extrusion of the footprint of each object.
  --offset [OFFSET [OFFSET ...]]
                        Substract an offset to all the vertices.
  --scale [SCALE]       Scale geometries by the input factor.
  --crs_in [CRS_IN]     Input projection.
  --crs_out [CRS_OUT]   Output projection.
  --with_texture        Adds texture to 3DTiles when defined
  --with_BTH            Adds a Batch Table Hierarchy when defined
  --split_surfaces      Keeps the surfaces of the cityObjects split when defined
  --db_config_path DB_CONFIG_PATH [DB_CONFIG_PATH ...]
                        Path(es) to the database configuration file(s)
  --time_stamps TIME_STAMPS [TIME_STAMPS ...]
                        Time stamps (corresponding to each database)
  --temporal_graph TEMPORAL_GRAPH [TEMPORAL_GRAPH ...]
                        GraphML-Json temporal data filename(s)

There is a positional db_config_path argument from CityTiler and an optional --db_config_path argument from the temporal tiler.

Because of this I am having some issues declaring the database configurations for the temporal tiler as shown in the documentation because everything declared with the --db_config_path flag is overwitten by the defaut path from db_config_path

For example:

(venv) diego@diego-IdeaPad-L340-17IRH-Gaming:~/Desktop/py3dtilers$ citygml-tiler-temporal \
  --db_config_path ~/Desktop/UD-Reproducibility/Computations/3DTiles/GratteCielTemporal2009-2018/CityTilerDBConfig2009.yml \
    ~/Desktop/UD-Reproducibility/Computations/3DTiles/GratteCielTemporal2009-2018/CityTilerDBConfig2012.yml \
    ~/Desktop/UD-Reproducibility/Computations/3DTiles/GratteCielTemporal2009-2018/CityTilerDBConfig2015.yml \
    ~/Desktop/UD-Reproducibility/Computations/3DTiles/GratteCielTemporal2009-2018/CityTilerDBConfig2018.yml \
  --time_stamps 2009 2012 2015 2018 \
  --temporal_graph ../Datasets/Villeurbanne_GratteCiel_2009-2018/3-diff/2009-2012/DifferencesAsGraph.json \
    ../Datasets/Villeurbanne_GratteCiel_2009-2018/3-diff/2012-2015/DifferencesAsGraph.json \
    ../Datasets/Villeurbanne_GratteCiel_2009-2018/3-diff/2015-2018/DifferencesAsGraph.json \

Mismatching number of databases vs time-stamps:
 - databases (configurations):  py3dtilers/CityTiler/CityTilerDBConfig.yml
 - timestamps:  ['2009', '2012', '2015', '2018']
Exiting.

Could we change the CityTemporalTiler flag to something unique such as --db_config_paths for example ? This should fix the conflict

DiegoVinasco commented 2 years ago

Both tilers now share the same db_config argument