Extracting max and min latitude and longitude from a .SEN3 folder

Hello,

I am trying to process a lot of .SEN3 folders and so am trying to speed up the process. Specifically I am trying to get the max and min latitude and longitude from a .SEN3 folder to quickly decide whether the folder is worth further investigation.

A little background: I am interested only in images that cover Greenland (specifically the ground weather stations on Greenland) however we are unaware before processing whether an image contains Greenland or is of the other side of the world. Presently I am using a python program that checks for each and every one of the 25 weather stations. The amount of time this takes makes the process untenable.

I noticed that when loading the geo_coordinates.nc file into QGIS a file named geo_coordinates.nc.aux.xml is created. Within this file is a max and min of the images latitude and longitude.

Is there a way to get this data?

Many thanks, Thomas.

This information is probabyl generated QGIS analysing the lat and lon data. So this is not direclty available.
As an alternative you could read the xfdumanifest.xml file and look for the footPrint.
You can parse to lat lon values and create a polygon and check it covers Greenland.

<sentinel-safe:footPrint srsName="http://www.opengis.net/def/crs/EPSG/0/4326">
    <gml:posList>-60.3636 -74.6925 -60.7307 -73.6798 -61.0902 -72.6429 -61.4432 -71.5772 -61.7856 -70.494 -62.1191 -69.3876 -62.446 -68.248 -62.7599 -67.0956 -63.0662 -65.9127 -63.3624 -64.7052 -63.6466 -63.4633 -63.9215 -62.2078 -64.183 -60.9253 -64.436 -59.6248 -64.6762 -58.2962 -64.9071 -56.9437 -65.1207 -55.5701 -65.3233 -54.1738 -65.5129 -52.7554 -65.6897 -51.3187 -63.1234 -49.688 -60.54 -48.2763 -57.9463 -47.0336 -55.3445 -45.922 -55.1998 -46.9782 -55.0463 -48.0296 -54.884 -49.0715 -54.7146 -50.1035 -54.5319 -51.1282 -54.3433 -52.1428 -54.1452 -53.1455 -53.941 -54.1461 -53.7278 -55.1276 -53.5087 -56.1073 -53.2783 -57.075 -53.0413 -58.0277 -52.7969 -58.9712 -52.5434 -59.9089 -52.2845 -60.8289 -52.0183 -61.7388 -51.7434 -62.6436 -51.4629 -63.5332 -51.1757 -64.4104 -53.5521 -66.542 -55.8831 -68.9321 -58.1591 -71.6309 -60.3636 -74.6925</gml:posList>
</sentinel-safe:footPrint>
1 Like

With a fair bit of experimentation that worked brilliantly! Thank you.
I haven’t attempted to create a polygon but just simply by checking the max and min of the latitude and longitude we are able to narrow down our search on a days worth of S3 OLCI images from around 700 folders to about 150 in less than a minute (and that was sequentially).
Thanks again.

1 Like