Open-EO / openeo-geotrellis-extensions

Java/Scala extensions for Geotrellis, for use with OpenEO GeoPySpark backend.
Apache License 2.0
5 stars 3 forks source link

Sentinel-2 L2A: datatype conversion issues #181

Closed jdries closed 1 year ago

jdries commented 1 year ago

Still have an issue when converting to int16, nodata values remain in output.

Relevant logging from j-263ff77fed1b4d1abc3336f1bc0e6252:

Datatype is int16

Created cube for Sentinel2 with metadata TileLayerMetadata(int16,LayoutDefinition(Extent(4440000.0, 2699520.0, 4460480.0, 2720000.0),CellSize(10.0,10.0),4x4 tiles,2048x2048 pixels),Extent(4440000.0, 2700000.0, 4460000.0, 2720000.0),EPSG:3035,KeyBounds(SpaceTimeKey(0,0,1583280000000),SpaceTimeKey(3,3,1604016000000))) and partitioner Some(SpacePartitioner(KeyBounds(SpaceTimeKey(0,0,1583280000000),SpaceTimeKey(3,3,1604016000000))))

Catalog query:

https://catalogue.dataspace.copernicus.eu/resto/api/collections/Sentinel2/search.json?box=11.575511321670996%2C47.39806148468685%2C11.846619755527241%2C47.5821772281624&sortParam=startDate&sortOrder=ascending&page=4&maxRecords=100&status=0%7C34%7C37&dataset=ESA-DATASET&productType=L2A&cloudCover=%5B0%2C95%5D&startDate=2020-03-01T00%3A00%3A00Z&completionDate=2020-10-31T23%3A59%3A59.999999999Z

Creating layer for SENTINEL2_L2A with load params {'temporal_extent': ('2020-03-01', '2020-10-31'), 'spatial_extent': {'west': 4440000, 'south': 2700000, 'east': 4460000, 'north': 2720000, 'crs': 'EPSG:3035'}, 'global_extent': {'west': 4440000, 'south': 2700000, 'east': 4460000, 'north': 2720000, 'crs': 'EPSG:3035'}, 'bands': ['B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B08', 'B11', 'B12', 'SCL'], 'properties': {'eo:cloud_cover': {'process_graph': {'lte1': {'process_id': 'lte', 'arguments': {'x': {'from_parameter': 'value'}, 'y': 95}, 'result': True}}}}, 'aggregate_spatial_geometries': None, 'sar_backscatter': None, 'process_types': {<ProcessType.GLOBAL_TIME: 4>}, 'custom_mask': {'method': 'mask_scl_dilation', 'erosion_kernel_size': 3, 'kernel1_size': 17, 'kernel2_size': 77, 'mask1_values': [2, 4, 5, 6, 7], 'mask2_values': [3, 8, 9, 10, 11], 'scl_band_name': 'SCL'}, 'data_mask': None, 'target_crs': 3035, 'target_resolution': [10.0, 10.0], 'resample_method': 'near', 'pixel_buffer': None}

EmileSonneveld commented 1 year ago

Handled here: https://git.vito.be/projects/APPL/repos/cropclass/pull-requests/43/overview