I guess that was a silly follow up question asked in haste ... I just
needed to play with the regex a little bit more ...

<value>(?&lt;=Z_)([0-9]{3})</value>   <!-- need to replace angle bracket
with &lt; in xml -->

- Mike


On Fri, Jun 6, 2014 at 12:52 PM, Mike Grogan <[email protected]>
wrote:

> Daniele, thanks for the quick reply!  One additional question, what would
> the <value> look like for the elevation dimension if my filename were to
> look like:
>
> surfacemore_20140523T130000000Z_500.tiff
>
> where the _500 is the elevation?
>
> Thanks again!
>
> - Mike
>
>
>
> On Fri, Jun 6, 2014 at 12:46 PM, Daniele Romagnoli <
> [email protected]> wrote:
>
>> Hi Mike,
>> when using the indexer.xml there is no more need of the other
>> regex.properties file... You just need to specify the regex in the
>> collectors sections.
>> Therefore, similarly to what you did with fileData, you can do this (It's
>> just an example which also allows you to specify the format of the
>> datetime):
>>
>>   <domains>
>>       <domain name="time">
>>          <attributes><attribute
>> ref="timeCollector">time</attribute></attributes>
>>       </domain>
>>     </domains>
>>     ...
>>     ...
>>     <collector name="timeCollector">
>>       <value>format=yyyyMMddHHmmss,regex=[0-9]{14}</value>
>>       <spi>TimestampFileNameExtractorSPI</spi>
>>       <mapped>time</mapped>
>>     </collector>
>> ...
>>
>> Cheers,
>> Daniele
>>
>> ==
>> GeoServer Professional Services from the experts! Visit
>> http://goo.gl/NWWaa2 for more information.
>> ==
>>
>> Ing. Daniele Romagnoli
>> Senior Software Engineer
>>
>> GeoSolutions S.A.S.
>> Via Poggio alle Viti 1187
>> 55054  Massarosa (LU)
>> Italy
>> phone: +39 0584 962313
>> fax:      +39 0584 1660272
>>
>> http://www.geo-solutions.it
>> http://twitter.com/geosolutions_it
>>
>> -------------------------------------------------------
>>
>>
>> On Fri, Jun 6, 2014 at 6:23 PM, Mike Grogan <[email protected]>
>> wrote:
>>
>>> I can't seem to find any documentation for it yet, so I am following
>>> Simone's presentation as well as investigating the code for adding custom
>>> dimensions using ImageMosaic and the new indexer.xml properties file.
>>>
>>> [For reference, the presentation is at:
>>> http://www.slideshare.net/geosolutions/geoserver-for-spatiotemporal-data-handling-with-examples-for-metoc-and-remote-sensing
>>> ]
>>>
>>> I am able to get the custom dimensions to populate in my database table
>>> ... but I am now struggling with the TIME dimension ... a non-custom
>>> dimension.  If I go the indexer.properties route, the time is picked up
>>> correctly.  However, using indexer.xml, the time is not being picked up
>>> from my filenames.
>>>
>>> For the "new" way of doing this with indexer.xml, where do I need to
>>> specify the regex for the time dimension and elevation dimension?  Do they
>>> now go somewhere besides the regex .properties files?
>>>
>>> For reference, my coverage/store is called "surfacemore".  My
>>> indexer.xml and timeregex.properties files are below, as is my file
>>> listing.  I'm not sure they are correct, but I'm trying to follow the
>>> presentation and some of the code to make this work.
>>>
>>> Thanks,
>>>
>>> Mike Grogan
>>> Meteorologist & Systems Engineer
>>> WeatherFlow, Inc., Synoptic
>>>
>>>
>>> indexer.xml:
>>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>>> <Indexer>
>>>    <domains>
>>>       <domain name="time">
>>>          <attributes><attribute>time</attribute></attributes>
>>>       </domain>
>>>       <domain name="fileDate">
>>>          <attributes><attribute
>>> ref="fileDateCollector">fileDate</attribute></attributes>
>>>       </domain>
>>>    </domains>
>>>    <schemas>
>>>       <schema name="default">
>>>
>>>  
>>> <attributes>*the_geom:Polygon,location:String,time:java.util.Date,fileDate:java.util.Date</attributes>
>>>       </schema>
>>>    </schemas>
>>>    <coverages>
>>>       <coverage>
>>>          <name>surfacemore</name>
>>>          <schema ref="default"></schema>
>>>          <domains>
>>>             <domain ref="time"/>
>>>             <domain ref="fileDate"/>
>>>          </domains>
>>>       </coverage>
>>>    </coverages>
>>>    <collectors>
>>>       <collector name="fileDateCollector">
>>>          <value>[0-9]{8}</value>
>>>          <spi>TimestampFileNameExtractorSPI</spi>
>>>          <mapped>fileDate</mapped>
>>>       </collector>
>>>    </collectors>
>>> </Indexer>
>>>
>>>
>>> timeregex.properties:
>>> regex=[0-9]{8}T[0-9]{9}Z(\?!.\*[0-9]{8}T[0-9]{9}Z.\*)
>>>
>>> file listing:
>>> surfacemore_20140523T130000000Z.tiff
>>> surfacemore_20140523T150000000Z.tiff
>>> (note: same results without the surfacemore_ in front)
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Learn Graph Databases - Download FREE O'Reilly Book
>>> "Graph Databases" is the definitive new guide to graph databases and
>>> their
>>> applications. Written by three acclaimed leaders in the field,
>>> this first edition is now available. Download your free book today!
>>> http://p.sf.net/sfu/NeoTech
>>> _______________________________________________
>>> Geoserver-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>>
>>
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to