utils.create_path_consolidated

utils.create_path_consolidated(
    provider,
    dataset_family,
    source,
    year,
    borders,
    crs,
    layout,
    simplification=0,
    filename='raw',
    bucket=BUCKET,
    path_within_bucket=PATH_WITHIN_BUCKET,
)

Path of a consolidated GeoParquet file within the S3 storage.

A consolidated file holds all the polygons of a level, to be filtered when read. This must stay identical to cartiflette/paths.py in the pipeline.

Parameters

Name Type Description Default
provider str required
dataset_family str required
source str required
year str required
borders str required
crs str required
simplification str required
filename str See create_path_bucket. 'raw'
bucket str See create_path_bucket. 'raw'
path_within_bucket str See create_path_bucket. 'raw'
layout str “FRANCE_ENTIERE” (true positions) or “FRANCE_ENTIERE_DROM_RAPPROCHES” (DROM moved next to metropolitan France, Ile-de-France zoomed in). The path segment is not named “geometry”: tools reading the path as hive partitions would shadow the geometry column. required

Returns

Name Type Description
str Path “bucket/path_within_bucket/provider=…/raw.parquet”.

Examples

>>> create_path_consolidated(
...     provider="IGN", dataset_family="ADMINEXPRESS",
...     source="EXPRESS-COG-CARTO-TERRITOIRE", year=2025,
...     borders="COMMUNE", crs=4326, layout="FRANCE_ENTIERE",
...     simplification=50,
... )
'projet-cartiflette/production/.../layout=FRANCE_ENTIERE/vectorfile_format=parquet/simplification=50/raw.parquet'
Retour au sommet