Thanks for the reply.  The image mosaic does not work in the console either.  I 
see the following error.



Could not list layers for this store, an error occurred retrieving them: Failed 
to create reader from 
file:data/dynamic/isisgridcoverage/ThresholdingMissionID-2/coaID-4/RuleID-5/ThresholdID-133
 and hints null



I did reply to my original email stating that I could get the Image Mosaic to 
work if I remove the indexer.properties file but I can’t get the TIME dimension 
to work.  I attached the email.  Please review it.



Thank you

Dominique



From: dany.geoto...@gmail.com [mailto:dany.geoto...@gmail.com] On Behalf Of 
Daniele Romagnoli
Sent: Monday, June 15, 2015 1:05 AM
To: Bessette-Halsema, Dominique E
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] image mosaic with GeoServerRESTPublisher



Hi Dominique,

a couple of feedbacks for your logs.

Please, read below...





On Fri, Jun 12, 2015 at 2:46 AM, Bessette-Halsema, Dominique E 
<dominique.besse...@gdit.com<mailto: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.



Not real errors... they are INFO messages. The GDAL machinery is reporting that 
it's unable to open the indexer.properties file using a

GDAL driver.



   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:]



   …….



   It seems some errors occurred on parsing the ASCii file's headers. Do you 
have any chance to share one of these files? I'm wondering whether their 
Headers are properly formed.







   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:



   As suggested by Mike, could you also check if you are able to configure it 
through the GeoServer GUI by simply configuring an ImageMosaic store pointing 
to that MOSAIC_DATA_DIR folder?



   Please, let us know.

   Best Regards,

   Daniele





   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<mailto:Geoserver-users@lists.sourceforge.net>
   https://lists.sourceforge.net/lists/listinfo/geoserver-users







   --

   ==
   GeoServer Professional Services from the experts! Visit
   http://goo.gl/it488V 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

   -------------------------------------------------------

   AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

   Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i 
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo 
è consentito esclusivamente al destinatario del messaggio, per le finalità 
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne 
il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di 
procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro 
sistema. Conservare il messaggio stesso, divulgarlo anche in parte, 
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, 
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.



   The information in this message and/or attachments, is intended solely for 
the attention and use of the named addressee(s) and may be confidential or 
proprietary in nature or covered by the provisions of privacy act (Legislative 
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in 
accord with its purpose, any disclosure, reproduction, copying, distribution, 
or either dissemination, either whole or partial, is strictly forbidden except 
previous formal approval of the named addressee(s). If you are not the intended 
recipient, please contact immediately the sender by telephone, fax or e-mail 
and delete the information in this message that has been received in error. The 
sender does not give any warranty or accept liability as the content, accuracy 
or completeness of sent messages and accepts no responsibility  for changes 
made after they were sent or for other risks which arise as a result of e-mail 
transmission, viruses, etc.



--- Begin Message ---
On last thing.  I exported the shapefile, created by geoserver, to a csv file 
and it contains the following.



WKT,location

"POLYGON ((0 0,0.0 2.157315340909101,2.588778409090921 
2.157315340909101,2.588778409090921 0.0,0 0))",133_2015-06-12T02:00:00.000Z.tif

"POLYGON ((0 0,0.0 2.157315340909101,2.588778409090921 
2.157315340909101,2.588778409090921 0.0,0 0))",133_2015-06-12T00:00:00.000Z.tif

"POLYGON ((0 0,0.0 2.157315340909101,2.588778409090921 
2.157315340909101,2.588778409090921 0.0,0 0))",133_2015-06-12T01:00:00.000Z.tif

"POLYGON ((0 0,0.0 2.157315340909101,2.588778409090921 
2.157315340909101,2.588778409090921 0.0,0 0))",133_2015-06-12T03:00:00.000Z.tif



How do I include the time in the shapefile?  I thought that geoserver include 
the time index that was in the name {coverage_time}.tif



I include the gdalinfo for a geotiff



Driver: GTiff/GeoTIFF

Files: 133_2015-06-12T01:00:00.000Z.tif

Size is 12, 10

Coordinate System is:

GEOGCS["WGS 84",

    DATUM["WGS_1984",

        SPHEROID["WGS 84",6378137,298.257223563,

            AUTHORITY["EPSG","7030"]],

        AUTHORITY["EPSG","6326"]],

    PRIMEM["Greenwich",0],

    UNIT["degree",0.0174532925199433],

    AUTHORITY["EPSG","4326"]]

Origin = (0.000000000000000,2.157315340909101)

Pixel Size = (0.215731534090910,-0.215731534090910)

Metadata:

  AREA_OR_POINT=Area

Image Structure Metadata:

  INTERLEAVE=BAND

Corner Coordinates:

Upper Left  (   0.0000000,   2.1573153) (  0d 0' 0.01"E,  2d 9'26.34"N)

Lower Left  (   0.0000000,   0.0000000) (  0d 0' 0.01"E,  0d 0' 0.01"N)

Upper Right (   2.5887784,   2.1573153) (  2d35'19.60"E,  2d 9'26.34"N)

Lower Right (   2.5887784,   0.0000000) (  2d35'19.60"E,  0d 0' 0.01"N)

Center      (   1.2943892,   1.0786577) (  1d17'39.80"E,  1d 4'43.17"N)

Band 1 Block=12x10 Type=Float32, ColorInterp=Gray



From: Bessette-Halsema, Dominique E
Sent: Friday, June 12, 2015 3:15 PM
To: geoserver-users@lists.sourceforge.net
Subject: RE: image mosaic with GeoServerRESTPublisher



I got the imagemosaic to work if I didn't include the indexer.properties and  
datastore.properties files and only had the geoTiffs.  I can render the layer 
in the layer preview, and see it in the get capabilities document.  The problem 
is the necessary Time dimension is not included in the get capabilities 
document, and I cant enable it in the geoserver console.  I'm assuming that's 
because I didn't include the indexer.properties file.



All the documentation states that the ImageMosaic needs the indexer.properties 
file but why does geoserver 2.7 break when I include it?



My indexer.properties file:



TimeAttribute = validtime

Schema = *the_geom:Polygon,location:String,validtime:java.util.Date

PropertyCollectors = TimestampFileNameExtractorSPI[timeregex](validtime)



After the Imagemosaic is complete I see the <parent folder name>.properties 
file  created from GeoTools.



#-Automagically created from GeoTools-

#Fri Jun 12 21:56:26 UTC 2015

Levels=0.21573153409091006,0.21573153409091006

Heterogeneous=false

AbsolutePath=false

Name=ThresholdID-133

TypeName=ThresholdID-133

Caching=false

ExpandToRGB=false

LocationAttribute=location

SuggestedSPI=it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReaderSpi

CheckAuxiliaryMetadata=false

LevelsNum=1



Thanks for your help

Dom



From: Bessette-Halsema, Dominique E
Sent: Thursday, June 11, 2015 5:47 PM
To: geoserver-users@lists.sourceforge.net
Subject: image mosaic with GeoServerRESTPublisher



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




--- End Message ---
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to