I’m going through the geotools code to figure it out.  If I come up with a 
solution I’ll post it



Thanks

Dom



From: Mike Grogan [mailto:d.michael.gro...@gmail.com]
Sent: Tuesday, June 16, 2015 8:04 AM
To: Bessette-Halsema, Dominique E
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] image mosaic with GeoServerRESTPublisher



Dominique,



I'll do my best to take a look at what you have sent -- and see if I can load 
it on a system -- when I can ... but I'm just another fellow user.



- Mike



On Mon, Jun 15, 2015 at 4:32 PM, Bessette-Halsema, Dominique E 
<dominique.besse...@gdit.com<mailto:dominique.besse...@gdit.com>> wrote:

Hi Mike



I added the tiff and properties files from the example in the below tutorial 
onto my machine, and I have the same issue.  I can create the database table, 
and datastore if I remove the indexer.properties file but then I can’t add the 
time and elevation dimensions.  When I add the indexer.properties file I see 
the errors in the attached log file.



Here’s the table definition



CREATE TABLE products."temperatureLZWdataset"

(

  fid serial NOT NULL,

  location character varying(255),

  the_geom geometry,

  CONSTRAINT "temperatureLZWdataset_pkey" PRIMARY KEY (fid),

  CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2),

  CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 
'POLYGON'::text OR the_geom IS NULL),

  CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4326)

)



I attached the properties files.



Also the file names in the tutorial are in the format  
gfs50kmTemperature20130310T180000000Z_0200.000_.tiff  but the tutorial states 
“Remember that every tif file must follow this naming convention:  
{coveragename}_{timestamp}_[{elevation}].tif”  Shouldn’t the tiff name be 
“gfs50kmTemperature_20130310T180000000Z_0200.000_.tiff” ?



Thanks

Dominique



From: Mike Grogan 
[mailto:d.michael.gro...@gmail.com<mailto:d.michael.gro...@gmail.com>]
Sent: Monday, June 15, 2015 9:37 AM
To: Bessette-Halsema, Dominique E
Cc: Daniele Romagnoli; 
geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net>


Subject: Re: [Geoserver-users] image mosaic with GeoServerRESTPublisher



Regarding specifically the ImageMosaicDirectoryWalker errors, I am thinking 
this is an issue with the specification of times in your filenames and the 
regular expression used against that.  I have found that I usually have to more 
fully specify the time with hours, minutes, seconds after the 'T' ... as 
GeoServer is designed to recognize just some specific ISO forms of time, if I 
recall.



Where you have 133_2015-06-11T03.tif, you might try 133_2015-06-11T030000Z.tif 
and a regex of regex = _[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{6}Z, or something 
similar to the filename and regex patterns given in 
http://docs.geoserver.org/latest/en/user/tutorials/imagemosaic_timeseries/imagemosaic_time-elevationseries.html.



Whenever I hit a ImageMosaicDirectoryWalker error, it seems like it has usually 
been due to my definition of time in the filename and regex.



If the .asc files are giving other errors, you might try this out with just the 
.tif files first and see if it works when expanding the definition of time in 
the filename and the regex.



- Mike







On Mon, Jun 15, 2015 at 11:54 AM, Bessette-Halsema, Dominique E 
<dominique.besse...@gdit.com<mailto:dominique.besse...@gdit.com>> wrote:

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> 
[mailto: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<mailto: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<tel:%2B39%200584%20962313>
   fax:      +39 0584 1660272<tel:%2B39%200584%201660272>

   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.







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

Reply via email to