todos
optional
examples
Calling lifecycle fn could go from this:
write_shapefile_xml_metadata(
product_name="pluto",
dataset_name="pluto",
path="path/to/shp/or/zip",
shp_name="pluto.shp",
zip_subdir=None,
org_md=None,
)
To something like this:
# shp example
write_metadata(
product_name="pluto",
dataset_name="pluto",
path="path/to/shp/parent/or/zip",
layer="pluto.shp",
zip_subdir=None,
org_md=None,
)
# fgdb example
write_metadata(
product_name="pluto",
dataset_name="pluto",
path="path/to/fgdb.gdb(.zip)",
layer="pluto",
zip_subdir=None, # only 'None' supported for FGDB
org_md=None,
)
Supported file path variations
unzipped gdb
path/to/geodatabase.gdb/layer_name
zipped gdb, unnested
path/to/geodatabase.gdb.zip/geodatabase.gdb/layer_name
unzipped shapefile
path/to/shapefile/layer_name.shp
zipped shapefile, unnested
path/to/shapefile/layer_name.shp.zip/layer_name.shp
zipped shapefile, nested
path/to/shapefile/layer_name.shp.zip/subdir/layer_name.shp
Unsupported file path variations
zipped gdb, nested
path/to/geodatabase.gdb.zip/subdir/geodatabase.gdb/layer_name
gdb (zipped or unzipped), with feature dataset:
path/to/geodatabase.gdb(.zip)/feature_dataset/layer_name
todos
dcpy/lifecycle/package/shapefiles.py::write_shapefile_xml_metadatafunction to handle shapefile and file geodatabase metadatashapefiles.pytopackage.pyor similarfile_idarg (related to prev. item)optional
examples
Calling lifecycle fn could go from this:
To something like this:
Supported file path variations
unzipped gdb
path/to/geodatabase.gdb/layer_namezipped gdb, unnested
path/to/geodatabase.gdb.zip/geodatabase.gdb/layer_nameunzipped shapefile
path/to/shapefile/layer_name.shpzipped shapefile, unnested
path/to/shapefile/layer_name.shp.zip/layer_name.shpzipped shapefile, nested
path/to/shapefile/layer_name.shp.zip/subdir/layer_name.shpUnsupported file path variations
zipped gdb, nested
path/to/geodatabase.gdb.zip/subdir/geodatabase.gdb/layer_namegdb (zipped or unzipped), with feature dataset:
path/to/geodatabase.gdb(.zip)/feature_dataset/layer_name