Sentinel-3: which coordinates to trust (lat, latitude, latitude_an...)

Hi!
I want to find the exact location on an image.
After making a subset in snappy of a Sentinel-3 FR image and saving it as NetCDF4-BEAM two more geographical bands (‘lat’ and ‘lon’) appeared in addition to the standard ‘latitude’ and ‘longitude’.
Values in ‘lat’ and ‘latitude’ are slightly different. SNAP uses ‘lat’ and ‘lon’ for pin placement.

Why the second pair appeared?

Which coordinates (‘lat’ ‘lon’ or ‘latitude’ ‘longitude’) should I trust?

The new lat and lon are introduced by our NetCdf writer.
You are using the tie-point based GeoCoding. These values are interpolated and written to the NetCDF variables lat and lon.
The latitude and longitude are provided per-pixel in the S3 data product. These values are more accurate.
You can switch in the Options dialog to let SNAP use these per-pixel values (Tools / Options / S3TBX).
But processing will be slower if this is turned on.

Thank you, Marco!

Is there a way to specify this reader in snappy?

I have already used
reader500 = ProductIO.getProductReader('Sen3_SLSTRL1B_500m')
product500 = reader500.readProductNodes(slstr_path, None)
from one of your previous posts. I suppose there is something similar for this reader.

Is it possible to find a full list of this readers?

If you did the change in SNAP Desktop it is also applied for snappy. Not 100% sure, but should be.
The settings are stored in:
<USER_DIR>/.snap/etc/s3tbx.properties
But you can do it with snappy, too:

System = jpy.get_type('java.lang.System')
System.setProperty('s3tbx.reader.slstrl1b.pixelGeoCodings', 'true')

Thank you, I’ll experiment.

Final question (at least in this thread):

Where do you find all these keywords: 'java.lang.System', 's3tbx.reader.slstrl1b.pixelGeoCodings'...

I found only http://step.esa.int/docs/v5.0/apidoc/engine/ and i’m afraid it’s not really understandable for me.
For some operations:File -> Display Parameters but for the others?

1 Like

Ok, let me describe in details what I do, because the switch did not help.

  1. open FR image (level-1 OLCI and SLSTR)

  2. subset it to the region of interest

  3. extract 3*3 pixel values around one coordinate somewhere in this region of interest

I suppose, accurate coordinates of extracted pixels are important for me (accuracy +/-0.001).

The subset is saved as “NetCDF4-BEAM” and has lat and lon (as you said, it is added by your writer). But now the reader (even if per-pixel geo-coding is specified) treats only lat and lon as coordinates.
Therefore pixel extraction (step 3) occurs with lat, lon not with per-pixel values.

The situation is even worse with SLSTR, because it has ao, an, bo, bn, co, cn… latitudes and longitudes. I assume they are also more accurate than lat, lon.

The question is: how can I extract pixels, according to their per-pixel coordinates from subset image?

PS
Your were right that SNAP and snappy share common options, but somehow it is not possible to subset by per-pixel coordinates with snappy.jpy.get_type(‘org.esa.snap.core.gpf.common.SubsetOp’). It gives an error
RuntimeError: org.esa.snap.core.gpf.OperatorException: latBand.getProduct().getSceneRasterWidth() < 2 || latBand.getProduct().getSceneRasterHeight() < 2