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: [email protected]
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: [email protected]
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
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users