We actually cover a similiar use case in our product. As we populate the DB tables ourselves, we don't use indexer at all, you probably don't need it either.
The datastore.properties to connect to the DB looks the following: > SPI=org.geotools.data.postgis.PostgisNGJNDIDataStoreFactory > jndiReferenceName=java:comp/env/jdbc/somename > schema=public > Loose\ bbox=true > preparedStatements=false then some of the most relevant fields in the mosaic.properties file: > Name=layer_name > TypeName=target_table_name > Caching=false > LocationAttribute=name_of_the_location_column > TimeAttribute=name_of_the_timestamp_column You may also need to specify at least some other, but as Carlo mentioned you can find it in the tutorials. Anyway, some of the other properties that we use in mosaic.properties, but they are not directly tied to the core issue here (we use custom SPI to fetch data from S3 and it needs some specific workarounds): > Levels=1,1 > LevelsNum=1 > MosaicCRS=EPSG\:3857 > Heterogeneous=true > HeterogeneousCRS=false > ExpandToRGB=false > CheckAuxiliaryMetadata=false > PathType=URL > SuggestedSPI=it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReaderSpi > SuggestedFormat=org.geotools.s3.geotiff.S3GeoTiffFormat > SuggestedIsSPI=org.geotools.s3.S3ImageInputStreamImplSpi Best, Jakub On 20.07.2021 13:43, carlo cancellieri wrote: > Yes its possible you are probably missing tha datastore.properties > pointing to the database? > Please (google) follow the time series howto with imagemosaic to check > if/what else you are missing. > > > Il giorno mar 20 lug 2021 alle 11:43 Andrew Chamberlain via > Geoserver-users <geoserver-users@lists.sourceforge.net > <mailto:geoserver-users@lists.sourceforge.net>> ha scritto: > > Hi All > > Apologies for the self-reply. I feel this is a bug, but before I > can raise one, I understand <http://geoserver.org/issues/> that it > first needs to be confirmed by a third party. I was therefore > wondering if anyone might be able to confirm the following: > > 1) It should be possible for an ImageMosaic layer to use a > pre-populated timestamp column in an existing granule index (i.e. > database table). > 2) The indexer.properties file below looks reasonable. > > Many thanks in advance, > > Andrew > > > > On Monday, 12 July 2021, 14:43:50 BST, Andrew Chamberlain via > Geoserver-users <geoserver-users@lists.sourceforge.net > <mailto:geoserver-users@lists.sourceforge.net>> wrote: > > > Hi All, > > Not sure if this should be possible, but I'm trying to configure > an ImageMosaic layer, whereby the index is pre-populated in a > Postgres database and includes a timestamp column for when the > imagery was captured. My indexer.properties file looks like: > > TimeAttribute=datecaptured > Schema=*geometry:Polygon,location:String,datecaptured:java.util.Date > PropertyCollectors= > UseExistingSchema=true > Caching=false > AbsolutePath=true > Name=metadata > > > However, when creating the layer, the TIME dimension remains > unavailable, with the message "/Cannot enable, no attribute of > type Date found/". I've also created an index in the database, in > case this mattered. > > I can't find an example of using a mosaic index with a > pre-populated time, so was starting to wonder whether it's > possible at all? > > Have tried on versions 2.17 and 2.19. Any pointers would be > greatly appreciated. > > Many thanks, > > Andrew Chamberlain > > > P.S. The only hint of any issue is the following from the logs, > but I imagine this is a red herring and just a minor UI issue? > > 2021-07-12 14:21:27,263 WARN [wicket.Localizer] - Tried to > retrieve a localized string for a component that has not yet been > added to the page. This can sometimes lead to an invalid or no > localized resource returned. Make sure you are not calling > Component#getString() inside your Component's constructor. > Offending component: [DimensionEditor [Component id = time]] > > > _______________________________________________ > Geoserver-users mailing list > > Please make sure you read the following two resources before > posting to this list: > - Earning your support instead of buying it, but Ian Turton: > http://www.ianturton.com/talks/foss4g.html#/ > <http://www.ianturton.com/talks/foss4g.html#/> > - The GeoServer user list posting guidelines: > http://geoserver.org/comm/userlist-guidelines.html > <http://geoserver.org/comm/userlist-guidelines.html> > > If you want to request a feature or an improvement, also see this: > > https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer > > <https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer> > > > Geoserver-users@lists.sourceforge.net > <mailto:Geoserver-users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/geoserver-users > <https://lists.sourceforge.net/lists/listinfo/geoserver-users> > _______________________________________________ > Geoserver-users mailing list > > Please make sure you read the following two resources before > posting to this list: > - Earning your support instead of buying it, but Ian Turton: > http://www.ianturton.com/talks/foss4g.html#/ > <http://www.ianturton.com/talks/foss4g.html#/> > - The GeoServer user list posting guidelines: > http://geoserver.org/comm/userlist-guidelines.html > <http://geoserver.org/comm/userlist-guidelines.html> > > If you want to request a feature or an improvement, also see this: > > https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer > > <https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer> > > > Geoserver-users@lists.sourceforge.net > <mailto:Geoserver-users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/geoserver-users > <https://lists.sourceforge.net/lists/listinfo/geoserver-users> > > -- > Mr. Carlo Cancellieri > *skype*: ccancellieri > *Twitter*: @cancellieric > *LinkedIn*: http://it.linkedin.com/in/ccancellieri/ > <http://it.linkedin.com/in/ccancellieri/> > > > _______________________________________________ > Geoserver-users mailing list > > Please make sure you read the following two resources before posting to this > list: > - Earning your support instead of buying it, but Ian Turton: > http://www.ianturton.com/talks/foss4g.html#/ > - The GeoServer user list posting guidelines: > http://geoserver.org/comm/userlist-guidelines.html > > If you want to request a feature or an improvement, also see this: > https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer > > > Geoserver-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-users
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users