Select to view content in your preferred language

Support for Relative Paths in Catalog Dataset "cd_itemsource" Field

287
1
01-22-2024 08:01 AM
Status: Under Consideration
Labels (1)
hbrownavineon
New Contributor II

I have been working with Catalog Datasets to reference a series of Raster files stored in a folder on my PC. Currently, the 'cd_itemsource' field references the Raster with an absolute path in the form of e.g.:

{'path': 'C:\\Users\\UserA\\...\\Project\\Images\\file.tif'}

This works on a single machine, but if I want to share the project (whether by zipping the project folder or generating a project package file), the item source within the Catalog Dataset still references the original path (which is to be expected). Another person trying to view the Catalog Dataset items would have to manually repoint the item sources to the new path on their machine. In my situation, a network drive (or any shared location) is not feasible.

Currently, I have a python script which uses an update cursor to set the paths to a target location. The script works fine, but is a cumbersome workaround.

I would like to suggest allowing for relative paths in the cd_itemsource field, which would let users reference items within the project folder.

 

Thanks!

1 Comment
TanuHoque
Status changed to: Under Consideration