As I continue to work on REST-based configuration of some Image Mosaic
stores, I know I will run into some questions, so I thought I would start a
thread for those here.  I hope that is ok.

My first question here involves the time attribute / dimension for a
store.  Specifically, I am using the new indexer.xml form of the indexer
for the image mosaic, but I am using it with geotiffs.  This has worked
fine in the past, with some pointers from Daniele and others.

If I create a new image mosaic through the web interface and allow it to
collect my granules at the same time, everything works fine.  The
auto-generated .properties file for the mosaic contains the TimeAttribute=
entry as expected, and when I go to publish a layer, the time dimension is
populated correctly with the value of the TimeAttribute.

However, when I zip up the indexer.xml and datastore.properties files and
use the REST interface to create an empty mosaic, then use the REST
interface again to harvest my granules, the auto-generated .properties file
does not contain the TimeAttribute= entry, and the web interface says the
time dimension is disabled ("Cannot enable, no attribute of type Date
found").

Oddly, everything in the database is fine ... the attribute for the time is
parsed correctly for each file.  If I manually add the TimeAttribute= back
to the auto-generated .properties file and reload the GeoServer
configuration, then it works.  It just seems, then, that the attribute
isn't getting added to properties when I harvest via REST.

I am pasting my indexer.xml file below.  I have dug into the code and have
tried adding the TimeAttribute to the parameters but it still seems to no
avail.

I greatly appreciate the help!

- Mike Grogan

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Indexer>
   <domains>
      <domain name="time">
         <attributes><attribute
ref="timeCollector">validtime</attribute></attributes>
      </domain>
      <domain name="level">
         <attributes><attribute
ref="levelCollector">level</attribute></attributes>
      </domain>
   </domains>
   <schemas>
      <schema name="default">

 
<attributes>the_geom:Polygon,location:String,validtime:java.util.Date,level:String</attributes>
      </schema>
   </schemas>
   <coverages>
      <coverage>
         <name>wind</name>
         <schema ref="default"></schema>
         <domains>
            <domain ref="time"/>
            <domain ref="level"/>
         </domains>
      </coverage>
   </coverages>
   <collectors>
      <collector name="timeCollector">
         <value>regex=[0-9]{8}T[0-9]{9}Z</value>
         <spi>TimestampFileNameExtractorSPI</spi>
         <mapped>validtime</mapped>
       </collector>
      <collector name="levelCollector">
         <value>(?&lt;=Z_)([a-zA-Z0-9]+)</value>   <!-- the lt is for
symbol -->
         <spi>StringFileNameExtractorSPI</spi>
         <mapped>level</mapped>
       </collector>
   </collectors>
   <parameters>
        <parameter name="Name" value="mywind10"/>
        <parameter name="TimeAttribute" value="validtime" />
        <parameter name="AbsolutePath" value="true" />
        <parameter name="CanBeEmpty" value="true" />
    </parameters>
</Indexer>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to