maximlamare / S3_extract

Extract the outputs from the S3 OLCI processor for a given number of S3 files at given coordinates.
MIT License
1 stars 2 forks source link

coordinates out of range? #4

Closed jasonebox closed 5 years ago

jasonebox commented 5 years ago

$ python s3_band_extract.py -i /Volumes/Ice/Sentinel-3/SLSTR/Data/2018-07/2018-07-01 -c /Users/jason/Dropbox/AWS/PROMICE/ancil/PROMICE.csv -o /Users/jason/Dropbox/S3/S3_extract/output -b cloud_in_1_37_threshold INFO: org.esa.s2tbx.dataio.gdal.activator.GDALDistributionInstaller: No distribution folder found on Macintosh. INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters Processing image n°1/9: S3A_SL_1_RBT20180701T103357_20180701T103657_20180702T162054_0179_033_051_1620_LN2_O_NT_003.SEN3 Processing image n°2/9: S3A_SL_1_RBT____20180701T121456_20180701T121756_20180702T171638_0179_033_052_1620_LN2_O_NT_003.SEN3 Processing image n°3/9: S3A_SL_1_RBT20180701T121756_20180701T122056_20180702T171754_0179_033_052_1800_LN2_O_NT_003.SEN3

Traceback (most recent call last): File "s3_band_extract.py", line 255, in input_args.res, File "s3_band_extract.py", line 95, in main slstr_res, File "/Users/jason/Dropbox/S3/S3_extract/S3_extract/snappy_funcs.py", line 757, in getS3bands pix_coords[0], pix_coords[1] RuntimeError: java.lang.NullPointerException

maximlamare commented 5 years ago

Curiously for some images, SNAP geocoding returns a negative pixel position value for a coordinate. Now if a negative value is returned, the value is not extracted for the coordinate (outside the image).