Hello Jeroen,

My hunch is that Ian is correct.

The delta is one hour I February (winter time or UTC + 1)
And two hours for dates in April (summer time or UTC + 2).

Kind regards, Jan Tjalling van der Wal

Sent from Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: Jeroen van Gent <jeroen.vang...@aeronomie.be>
Sent: Thursday, March 2, 2023 8:22:18 PM
To: Ian Turton <ijtur...@gmail.com>
Cc: geoserver-users@lists.sourceforge.net 
<geoserver-users@lists.sourceforge.net>
Subject: Re: [Geoserver-users] ImageMosaic timeregex + PostGres DB giving wrong 
time.


Thank you, But it that case I would expect a constant delta time between the 
times in the file name and those in the DB, which is not the case.

But I will double check.

Jeroen


On 2/03/2023 17:51, Ian Turton wrote:
The times in the database will be in UTC, and I guess you're in UTC+!. Add 
-Duser.timezone=GMT to make it work as you expect

Ian

On Thu, 2 Mar 2023 at 16:37, Jeroen van Gent 
<jeroen.vang...@aeronomie.be<mailto:jeroen.vang...@aeronomie.be>> wrote:

Hello all,

I have been trying to create an Imagemosaic GeoTiff data store, using a 
Postgres database.

The typical filename pattern for the GeoTiffs is:

s5p_tropomi_so2vcd_epsg3857_{yyyyMMdd}T{HHmmss}_{orbitnumber}.tiff, for example:

s5p_tropomi_so2vcd_epsg3857_20220604T210415_27650.tiff.


I have declared the following regular expression in 'timeregex.properties':

regex=_[0-9]{8}T[0-9]{6}_,format='_'yyyyMMdd'T'HHmmss'_'

I can successfully create the store, and files seems to be properly ingested 
into the database, but when looking in the database table, the entries seem to 
give the correct date, but the wrong time, at least for the hour field:

| location                                               | ingestion           |


| s5p_tropomi_so2vcd_epsg3857_20230213T120806_27653.tiff | 2023-02-13 13:08:06 |


| s5p_tropomi_so2vcd_epsg3857_20220604T021341_27650.tiff | 2022-06-04 04:13:41 |

| s5p_tropomi_so2vcd_epsg3857_20220604T210415_27650.tiff | 2022-06-04 23:04:15 |


Some relevant lines from the GeoServer logs:

SELECT count(*) FROM "public"."s5p_tropomi_so2vcd_epsg3857_test" WHERE 
("location" = ? AND "location" IS NOT NULL )
2023-03-02 16:22:56,601 DEBUG [geotools.jdbc] - 1 = 
s5p_tropomi_so2vcd_epsg3857_20220604T021341_27650.tiff
2023-03-02 16:22:56,601 DEBUG [geotools.jdbc] - SELECT 
"fid",ST_AsEWKB("the_geom") as "the_geom","location","ingestion" FROM 
"public"."s5p_tropomi_so2vcd_epsg3857_test" LIMIT 1
2023-03-02 16:22:56,602 DEBUG [geotools.jdbc] - SELECT 
ST_AsText(ST_Force2D(ST_Envelope(ST_Extent("the_geom"::geometry)))) FROM 
"public"."s5p_tropomi_so2vcd_epsg3857_test"
2023-03-02 16:22:56,604 DEBUG [geotools.jdbc] - SELECT 
"fid",ST_AsEWKB("the_geom") as "the_geom","location","ingestion" FROM 
"public"."s5p_tropomi_so2vcd_epsg3857_test" WHERE 0 = 1
2023-03-02 16:22:56,605 DEBUG [geotools.jdbc] - Setting the_geom to POLYGON 
((-20026376.39 -20048673.9, -20026376.39 20048966.1, 20026863.61 20048966.1, 
20026863.61 -20048673.9, -20026376.39 -20048673.9))
2023-03-02 16:22:56,605 DEBUG [geotools.jdbc] - Setting 0 to POLYGON 
((-20026376.39 -20048673.9, -20026376.39 20048966.1, 20026863.61 20048966.1, 
20026863.61 -20048673.9, -20026376.39 -20048673.9))
2023-03-02 16:22:56,605 DEBUG [geotools.jdbc] - Setting location to 
s5p_tropomi_so2vcd_epsg3857_20220604T021341_27650.tiff
2023-03-02 16:22:56,605 DEBUG [geotools.jdbc] - Setting 1 to 
s5p_tropomi_so2vcd_epsg3857_20220604T021341_27650.tiff
2023-03-02 16:22:56,605 DEBUG [geotools.jdbc] - Setting ingestion to 2022-06-04 
04:13:41.0
2023-03-02 16:22:56,605 DEBUG [geotools.jdbc] - Setting 2 to 2022-06-04 
04:13:41.0
2023-03-02 16:22:56,605 DEBUG [geotools.jdbc] - Inserting new features with ps: 
INSERT INTO "public"."s5p_tropomi_so2vcd_epsg3857_test" ( 
"the_geom","location","ingestion" ) VALUES ( ST_GeomFromWKB(?, 3857),?,?)
2023-03-02 16:22:56,605 DEBUG [geotools.jdbc] - 1 = POLYGON ((-20026376.39 
-20048673.9, -20026376.39 20048966.1, 20026863.61 20048966.1, 20026863.61 
-20048673.9, -20026376.39 -20048673.9))
2023-03-02 16:22:56,605 DEBUG [geotools.jdbc] - 2 = 
s5p_tropomi_so2vcd_epsg3857_20220604T021341_27650.tiff
2023-03-02 16:22:56,605 DEBUG [geotools.jdbc] - 3 = 2022-06-04 04:13:41.0


For what it's worth: the *.properties files are in the same folder as my data 
files.

I am using GeoServer 2.20.2.

Any suggestions?

Thanks,

Jeroen

_______________________________________________
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#/<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ianturton.com%2Ftalks%2Ffoss4g.html%23%2F&data=05%7C01%7CJan_Tjalling.vanderWal%40wur.nl%7C596b7bba161943b7c85308db1b5a69d9%7C27d137e5761f4dc1af88d26430abb18f%7C0%7C0%7C638133847381282721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5gWDV%2Ffx%2FaCDF%2F%2FxL0Rhrhwo%2FtBywgEsE9BarsKZoS4%3D&reserved=0>
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgeoserver.org%2Fcomm%2Fuserlist-guidelines.html&data=05%7C01%7CJan_Tjalling.vanderWal%40wur.nl%7C596b7bba161943b7c85308db1b5a69d9%7C27d137e5761f4dc1af88d26430abb18f%7C0%7C0%7C638133847381282721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DeEBXxdNRqhNLIPD6SKb70AB%2F%2BwL%2FJ1MdmPHWQ8Hjms%3D&reserved=0>

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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeoserver%2Fgeoserver%2Fwiki%2FSuccessfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer&data=05%7C01%7CJan_Tjalling.vanderWal%40wur.nl%7C596b7bba161943b7c85308db1b5a69d9%7C27d137e5761f4dc1af88d26430abb18f%7C0%7C0%7C638133847381282721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=eKynav7yEFeKZiwsFKQWaOy17XacIvdHcCQ2Nk7e0Ds%3D&reserved=0>


Geoserver-users@lists.sourceforge.net<mailto:Geoserver-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-users<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fgeoserver-users&data=05%7C01%7CJan_Tjalling.vanderWal%40wur.nl%7C596b7bba161943b7c85308db1b5a69d9%7C27d137e5761f4dc1af88d26430abb18f%7C0%7C0%7C638133847381282721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=s1ogLtU3rtjuAqk%2Bp6VHM4%2FAxB75GTyHAU9Bxs0z2YA%3D&reserved=0>


--
Ian Turton

[https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&data=05%7C01%7CJan_Tjalling.vanderWal%40wur.nl%7C596b7bba161943b7c85308db1b5a69d9%7C27d137e5761f4dc1af88d26430abb18f%7C0%7C0%7C638133847381282721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Favw0TtmYUeCQ3bbrYe0ZgNEb1VW1r04LylxTjDSSCo%3D&reserved=0>
     
Virusvrij.www.avast.com<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&data=05%7C01%7CJan_Tjalling.vanderWal%40wur.nl%7C596b7bba161943b7c85308db1b5a69d9%7C27d137e5761f4dc1af88d26430abb18f%7C0%7C0%7C638133847381438972%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5kuyarQtebM4sS5Sd2vamLrAMD%2Fk0lo9E%2FB7IGTo0mk%3D&reserved=0>
_______________________________________________
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

Reply via email to