Dear Sen4Cap,
We have observed that S1 L2 product generated strange output as below screenshot even though our sample site is on Netherlands? Currently, we are running on V 1.1. Is it a bug of V 1.1? We better to upgrade V 1.2? Our concern is starting site from the scratch again.
Thanks and Regards,
Henry
Dear Henry,
Yes, that was an issue with the projected coordinates of the footprint for the quicklook (the actual product did not have any problem). This issue was addressed in v1.2, but I think that the footprint for these products has to be manually updated in the database, on a case-by-case basis. If you want to keep them, then I can send you some small instructions on how to do that (please write me at kraftek@c-s.ro).
Best regards,
Cosmin.
1 Like
Dear Cosmin,
Looking forward to trying out the instruction. I have sent email yesterday. sent by henryhein@gmail.com
Thanks and Regards,
Henry
Dear Henry,
I have sent you a script by email.
For reference, and if someone else would encounter the same problem, I am also uploading it here:
correct_s1_l2_footprints.txt (1.7 KB)
How to use it:
- Copy it in your home directory
- Rename it to correct_s1_l2_footprints.sh
- Make it executable
chmod +x correct_s1_l2_footprints.sh
- Execute it as sudo:
sudo ./correct_s1_l2_footprints.sh <site_folder>
where <site_folder> is the path to your site (for example, /mnt/archive/myTestSite).
Cosmin.
1 Like
Dear Cosmin,
Thanks a lot for your support, as usual.
Itβs worked after I changed a few parameters.
Here is what I did.
- I run these commands manually as I got some errors (couldnβt recall)
find l2a-s1/ -name β_AMP.tifβ -print0 | while IFS= read -r -d ββ line; do IFS=β/β read -ra arr <<< $line; ( echo βUPDATE product SET geog = st_geogfromtext(TRIM('β; echo βPOLYGON((β; gdalinfo -json β$lineβ | jq -r β.wgs84Extent.coordinates[][]β | tr -s β[,β " " | tr β]β β,β | xargs | rev | cut -c 2- | rev; echo β))β)) WHERE name = TRIM(ββ; echo ${arr[2]} | rev | cut -c 5- | rev; echo β');β; echo βUPDATE product SET footprint = (SELECT β(β || string_agg(REPLACE(replace(ST_AsText(geom) :: text, βPOINTβ, ββ), β β, β,β), β,β) || β)β from ST_DumpPoints(ST_Envelope(geog :: geometry)) WHERE path[2] IN (1, 3)) :: POLYGON WHERE name = TRIM(ββ; echo ${arr[2]} | rev | cut -c 5- | rev; echo β');β ) | cat | tr β\r\n\tβ β β >> ~/sql_amp.txt; done;
find l2a-s1/ -name '_COHE.tifβ -print0 | while IFS= read -r -d ββ line; do IFS=β/β read -ra arr <<< $line; ( echo βUPDATE product SET geog = st_geogfromtext(TRIM('β; echo βPOLYGON((β; gdalinfo -json β$lineβ | jq -r β.wgs84Extent.coordinatesβ | tr -s β[,β " " | tr β]β β,β | xargs | rev | cut -c 2- | rev; echo β))β)) WHERE name = TRIM(ββ; echo ${arr[2]} | rev | cut -c 5- | rev; echo β');β; echo βUPDATE product SET footprint = (SELECT β(β || string_agg(REPLACE(replace(ST_AsText(geom) :: text, βPOINTβ, ββ), β β, β,β), β,β) || β)β from ST_DumpPoints(ST_Envelope(geog :: geometry)) WHERE path[2] IN (1, 3)) :: POLYGON WHERE name = TRIM(ββ; echo ${arr[2]} | rev | cut -c 5- | rev; echo β');β ) | cat | tr β\r\n\tβ β β >> sql_cohe.txt; done;
- I changed to sen2agri-service username as postgres user name is not allowed.
sudo psql -U sen2agri-service -d sen4cap -a -f sql_amp.txt
sudo psql -U sen2agri-service -d sen4cap -a -f sql_cohe.txt
Regards,
Henry
Dear Sen4Cap,
i do encounter the same Problem. For my understanding, it is not a problem with the S1 L2 products itself, but a problem with the projection in the presentation in the product tab?
Therefore calculating with the data is possible?
Thanks!
1 Like