1

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?

1 Answer 1

1

It looks like the fullpath parameter is hardcoded to false in StringFileNameExtractor while it is an option in the TimestampFileNameExtractor so you would need to add some code to support accepting that as a parameter with Strings. Worth discussing on the user list to see if anyone has already done this and then raise it as an enhancement on jira before you start coding or you can hire someone to look at it for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.