Dominique, That is the best way to add TIME and ELEVATION for raster data. One quick troubleshooting question, did you also try to publish this via the GeoServer web GUI? Just wondering if it worked through the GUI?
I'm seeing both some ascii grids and geotiffs in that directory with the same times. I'm wondering if that might be causing an issue? - Mike Grogan On Thu, Jun 11, 2015 at 8:46 PM, Bessette-Halsema, Dominique E < dominique.besse...@gdit.com> wrote: > Is the image mosaic the best way to add TIME and ELEVATION dimensions to > a layer in geoserver? > > > > If so, I’m having an issues creating an image mosaic with the > GeoServerRESTPublisher API in GeoServer 2.7. > > > > I create several geotiffs to a file directory within the > GEOSERVER_DATA_DIR/data/. with the name structure ID_TIME.tiff > (133_2015-06-11T03.tif) > > > > I then create the indexer, timeregex and datastore properties files. > > > > Using the GeoServerRESTPublisher I try to post the mosaic to geoserver > publishExternalMosaic(workspace, storename, new File(path), coverageEnc, > encoder) > > > > It creates the ImageMosaic Store but fails when it creates the layer > > > > I get the following error: > > > > > > 00:19:40,009 INFO [org.geoserver.catalog.rest] (http-/0.0.0.0:8080-2) > Using existing coverage store: COA_ID_1.RULE_ID_5.THRESHOLD_ID_133 > > ERROR 4: > `/gis/geoserver/external/data/dynamic/missionthresholding/THRESHOLDING_MISSION_ID_1/COA_ID_1/RULE_ID_5/THRESHOLD_ID_133/indexer.properties' > not recognised as a supported file format. > > > > ERROR 4: > `/gis/geoserver/external/data/dynamic/missionthresholding/THRESHOLDING_MISSION_ID_1/COA_ID_1/RULE_ID_5/THRESHOLD_ID_133/indexer.properties' > not recognised as a supported file format. > > > > 00:19:40,063 ERROR [class org.geotools.gce.imagemosaic.Utils] > (http-/0.0.0.0:8080-2) For input string: "E": > java.lang.NumberFormatException: For input string: "E" > > at > sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1250) > [rt.jar:1.7.0_72] > > at java.lang.Double.parseDouble(Double.java:540) [rt.jar:1.7.0_72] > > at > it.geosolutions.imageio.utilities.StringToDouble.compute(StringToDouble.java:272) > [imageio-ext-utilities-1.1.10.jar:] > > at > it.geosolutions.imageio.plugins.arcgrid.raster.AsciiGridRaster.getValue(AsciiGridRaster.java:1154) > [imageio-ext-arcgrid-1.1.10.jar:] > > at > it.geosolutions.imageio.plugins.arcgrid.raster.EsriAsciiGridRaster.parseHeader(EsriAsciiGridRaster.java:161) > [imageio-ext-arcgrid-1.1.10.jar:] > > at > it.geosolutions.imageio.plugins.arcgrid.spi.AsciiGridsImageReaderSpi.canDecodeInput(AsciiGridsImageReaderSpi.java:217) > [imageio-ext-arcgrid-1.1.10.jar:] > > > > ……. > > > > > > 00:29:08,039 WARN [org.geotools.gce.imagemosaic] (http-/0.0.0.0:8080-2) > Failure occurred while collecting the granules: > org.apache.commons.io.DirectoryWalker$CancelException: Operation Cancelled > > at > org.apache.commons.io.DirectoryWalker.checkIfCancelled(DirectoryWalker.java:395) > [commons-io-2.1.jar:2.1] > > at > org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:368) > [commons-io-2.1.jar:2.1] > > at > org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:335) > [commons-io-2.1.jar:2.1] > > at > org.geotools.gce.imagemosaic.ImageMosaicDirectoryWalker$MosaicDirectoryWalker.<init>(ImageMosaicDirectoryWalker.java:114) > [gt-imagemosaic-13.1.jar:] > > at > org.geotools.gce.imagemosaic.ImageMosaicDirectoryWalker.run(ImageMosaicDirectoryWalker.java:196) > [gt-imagemosaic-13.1.jar:] > > at org.geotools.gce.imagemosaic.Utils.createMosaic(Utils.java:354) > [gt-imagemosaic-13.1.jar:] > > at org.geotools.gce.imagemosaic.Utils.checkSource(Utils.java:1223) > [gt-imagemosaic-13.1.jar:] > > at > org.geotools.gce.imagemosaic.ImageMosaicReader.initReaderFromURL(ImageMosaicReader.java:516) > [gt-imagemosaic-13.1.jar:] > > at > org.geotools.gce.imagemosaic.ImageMosaicReader.<init>(ImageMosaicReader.java:468) > [gt-imagemosaic-13.1.jar:] > > at > org.geotools.gce.imagemosaic.ImageMosaicFormat.getReader(ImageMosaicFormat.java:483) > [gt-imagemosaic-13.1.jar:] > > at > org.geotools.gce.imagemosaic.ImageMosaicFormat.getReader(ImageMosaicFormat.java:103) > [gt-imagemosaic-13.1.jar: > > > > > > > > more INFO: > > > > MOSAIC_DATA_DIR contents: > > > > 133_2015-06-11T00.asc > > 133_2015-06-11T01.asc > > 133_2015-06-11T02.asc > > 133_2015-06-11T03.asc > > 133_2015-06-11T00.tif > > 133_2015-06-11T01.tif > > 133_2015-06-11T02.tif > > 133_2015-06-11T03.tif > > indexer.properties > > datastore.properties > > timeregex.properties > > > > datastore.properties > > > > schema = geoimpact > > preparedStatements = true > > SPI = org.geotools.data.postgis.PostgisNGJNDIDataStoreFactory > > jndiReferenceName = java:jboss/datasources/gisDB > > > > indexer.properties: > > > > TimeAttribute = validtime > > AdditionalDomainAttributes = analysis_time > > Schema = > *the_geom:Polygon,location:String,validtime:java.util.Date,analysis_time:java.util.Date > > PropertyCollectors = > TimestampFileNameExtractorSPI[timeregex](validtime),TimestampFileNameExtractorSPI[timeregex](analysis_time) > > > > Timeregex.properties > > > > regex = [0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2} > > > > Thanks for you help > > Dom > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Geoserver-users mailing list > Geoserver-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-users > >
------------------------------------------------------------------------------
_______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users