I'm setting up an ImageMosaic store with GeoTIFF granules.
My store is located in a root directory having granules distributed in a UUID-based subdirectories structure like:
root_dir/
|- 6ea93852-4cd8-498b-9066-3f90bec9e20e
|-- granule_2015.tif
|-- granule_2016.tif
|- ce376400-5cf2-4f8b-8825-9135e146f022
|-- granule_2015.tif
|-- granule_2016.tif
|- ....
I want these UUIDs to be extracted as additional attributes of each granule.
I created the following indexer.properties
:
Schema=*the_geom:Polygon,location:String,time:java.util.Date,uuid:String
PropertyCollectors=TimestampFileNameExtractorSPI[timeregex](time),StringFileNameExtractorSPI[uuid_regex](uuid)
AdditionalDomainAttributes=uuid(uuid)
Wildcard=*.tif
TimeAttribute=time
And the following uuid_regex.properties
:
regex=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12},fullPath=true
Unfortunately, the fullPath
element seems to work only for TimestampFileNameExtractorSPI
- as per this tutorial.
Is there any way I can achieve the same result for a StringFileNameExtractorSPI
so I can successfully extract the UUID from the full file path?