Skip to content

Commit c78fdf1

Browse files
authored
Merge pull request #31 from VCityTeam/fix-config_path
CityTiler and CityTemporalTiler use the same config path
2 parents f115ac3 + 3c39111 commit c78fdf1

File tree

3 files changed

+15
-20
lines changed

3 files changed

+15
-20
lines changed

py3dtilers/CityTiler/CityTemporalTiler.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ class CityTemporalTiler(CityTiler):
2222
def __init__(self):
2323
super().__init__()
2424

25-
self.parser.add_argument('--db_config_path',
26-
nargs='+',
27-
default='CityTilerDBConfig.yml',
28-
type=str,
29-
help='Path(es) to the database configuration file(s)')
3025
self.parser.add_argument('--time_stamps',
3126
nargs='+',
3227
type=str,

py3dtilers/CityTiler/CityTiler.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ def __init__(self):
1818
super().__init__()
1919

2020
# adding positional arguments
21-
self.parser.add_argument('db_config_path',
22-
nargs='?',
21+
self.parser.add_argument('--db_config_path',
22+
nargs='*',
2323
default='py3dtilers/CityTiler/CityTilerDBConfig.yml',
24-
type=str, # why precise this if it is the default config ?
25-
help='path to the database configuration file')
24+
type=str,
25+
help='Path(es) to the database configuration file(s)')
2626

2727
self.parser.add_argument('object_type',
2828
nargs='?',
@@ -159,7 +159,7 @@ def main():
159159
city_tiler.parse_command_line()
160160
args = city_tiler.args
161161

162-
cursor = open_data_base(args.db_config_path)
162+
cursor = open_data_base(args.db_config_path[0])
163163

164164
if args.object_type == "building":
165165
objects_type = CityMBuildings

py3dtilers/CityTiler/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Copy and customize the [CityTilerDBConfigReference.yml](CityTilerDBConfigReferen
1616

1717
You can then run the tiler by specifying the path to the _.yml_ configuration file:
1818
```
19-
citygml-tiler <path_to_file>/Config.yml
19+
citygml-tiler --db_config_path <path_to_file>/Config.yml
2020
```
2121

2222
The created tileset will be placed in a folder named `junk_<objects-type>` in the root directory. The name of the folder will be either `junk_buildings`, `junk_reliefs`, `junk_water_bodies` or `junk_bridges`, depending on the [objects type](#objects-type) (respectively `building`, `relief`, `water` and `bridge`).
@@ -31,27 +31,27 @@ By default, the tiler will treat the data as __buildings__. You can change the t
3131

3232
* `building`
3333
```
34-
citygml-tiler <path_to_file>/Config.yml building
34+
citygml-tiler --db_config_path <path_to_file>/Config.yml building
3535
```
3636
* `relief`
3737
```
38-
citygml-tiler <path_to_file>/Config.yml relief
38+
citygml-tiler --db_config_path <path_to_file>/Config.yml relief
3939
```
4040
* `water`
4141
```
42-
citygml-tiler <path_to_file>/Config.yml water
42+
citygml-tiler --db_config_path <path_to_file>/Config.yml water
4343
```
4444
* `bridge`
4545
```
46-
citygml-tiler <path_to_file>/Config.yml bridge
46+
citygml-tiler --db_config_path <path_to_file>/Config.yml bridge
4747
```
4848

4949
### LOA
5050
Using the LOA\* option creates a tileset with a __refinement hierarchy__. The leaves of the created tree are the detailed features (features loaded from the data source) and their parents are LOA geometries of those detailed features. The LOA geometries are 3D extrusions of polygons. The polygons must be given as a path to a Geojson file, or a directory containing Geojson file(s) (the features in those geojsons must be Polygons or MultiPolygons). The polygons can for example be roads, boroughs, rivers or any other geographical partition.
5151

5252
To use the LOA option:
5353
```
54-
citygml-tiler <path_to_file>/Config.yml --loa <path-to-polygons>
54+
citygml-tiler --db_config_path <path_to_file>/Config.yml --loa <path-to-polygons>
5555
```
5656

5757
\*_LOA (Level Of Abstraction): here, it is simple 3D extrusion of a polygon._
@@ -61,30 +61,30 @@ Using the LOD1 option creates a tileset with a __refinement hierarchy__. The lea
6161

6262
To use the LOD1 option:
6363
```
64-
citygml-tiler <path_to_file>/Config.yml --lod1
64+
citygml-tiler --db_config_path <path_to_file>/Config.yml --lod1
6565
```
6666

6767
### Textures
6868
By default, the objects are created without their texture.
6969

7070
To add texture:
7171
```
72-
citygml-tiler <path_to_file>/Config.yml --with_texture
72+
citygml-tiler --db_config_path <path_to_file>/Config.yml --with_texture
7373
```
7474

7575
### Split surfaces
7676
By default, the tiler merges the surfaces of the same CityObject into one geometry. When using the `split_surfaces` flag, all surfaces will be an independent geometry.
7777

7878
To keep the surfaces split:
7979
```
80-
citygml-tiler <path_to_file>/Config.yml --split_surfaces
80+
citygml-tiler --db_config_path <path_to_file>/Config.yml --split_surfaces
8181
```
8282
### Batch Table Hierarchy
8383
The Batch table hierarchy is a [Batch Table](https://github.com/CesiumGS/3d-tiles/blob/main/specification/TileFormats/BatchTable/README.md) extension. This extension creates a link between the buildings and their surfaces.
8484

8585
To create the BatchTableHierarchy extension:
8686
```
87-
citygml-tiler <path_to_file>/Config.yml --with_BTH
87+
citygml-tiler --db_config_path <path_to_file>/Config.yml --with_BTH
8888
```
8989

9090
# City Temporal Tiler

0 commit comments

Comments
 (0)