PRISMA (PRecursore IperSpettrale della Missione Applicativa) is a pilot hyperspectral satellite launched by ASI (Agenzia Spaziale Italiana) in 2019. Its main research pillars are agriculture, forest, waters, climate change, and raw material exploration. In the context of PRISMA data processing, three issues arise when dealing with L1 (Top of Atmosphere Radiance) and L2 (Bottom of Atmosphere Reflectance) products. First, the products are delivered in HDF format, which is not commonly ready-to-use in a geospatial software, and hyperspectral data is stored into two different stacks, Visibile to Near InfraRed and ShortWave InfraRed, to be merged for further processing. Secondly, PRISMA geocoding accuracy is not within the pixel size (30 m), and then requires a refinement. Thirdly, users may need to perform an ad hoc atmospheric correction for particular targets (e.g. water) and L1 is not geocoded. Available PRISMA tools, importing its format are ENVI-toolkit (NV5 Geospatial Software, Inc.), PRISMA-toolbox (Planetek) and EnMap-Box (GFZ), but only the former – that is commercial - provides for geocoding refinement and no geocoding for L1. To fill this lack with open SW, we realized a seamless procedure starting from standard HDF files to build the L1 geocoded and the L2 geocoding-refined products, in addition, regridding and smoothing routines are offered. The tool is based on open source libraries: prismaread for data conversion, cube merging and basic metadata gathering, and AROSICS and gdal for the geocoding (refinement of L2 or process of L1). For L1 information useful for atmospheric correction (e.g. sun and sensors view angles, band centers, etc.) are also extracted from HDF metadata. The regridding step is added both to L1 and L2 image to enable for multi-temporal image stacks. Last step is the spectral smoothing that is straightforwardly applied to the L2 process chain while it is applied to L1 chain only after atmospheric correction. Since the workflow takes advantages of different libraries and languages (R, Python) an Rstudio Server docker has been created together with a GitHub code repository, to create an easy-to-use distribution which do not require to solve all the dependencies of all libraries used.
PRISTAR-GEOSPEC tool can help you in:
- importing L0, L1, L2 PRISMA products downloaded from ASI portal;
- extracting and cleaning cloud mask for PRISMA;
- creating quicklooks (true color RGB, false colour composite and SWIR composite);
- creating unique hyperspectral datacube VNIR+SWIR;
- extracting raster of angles;
- extracting central wavelengths and FWHMs;
- extracting and computing sun and sensor angles of PRISMA image (e.g. for your own atmospheric correction procedure);
- using a built-in atmospheric corrector (JPL-NASA ISOFIT) to process your PRISMA L1 products;
- DEM-guided orthoprojection of PRISMA with DEM and Sentinel-2 image using AROSICS and Rational Polynomial Function (RPF);
- coregistration of PRISMA to Sentinel-2 image using AROSICS and gdalwarp. For images where GNSS has gone wrong, this procedure is helped with a rigid shift that you can do with a built-in tool;
- spectral smoothing and bad-bands removal;
- regriding and cropping the PRISMA image to a master PRISMA image so as you can create time series stack of PRISMA images;
- keeping all the useful metadata (central wavelengths, FWHMs, band names, cloud mask) of the image;
- having each intermediate step of all the processing done over the original ASI PRISMA "standard" image in a standardized folder structure and with a coherent naming convention;
- apply all this workflow to an entire archive of time series of PRISMA images over the same area without much effort in organising the data thanks to the already-prepared folder structure.
#Emanuele Spirito @ CNR-IREA (first author)
#Lorenzo Parigi @ CNR-IREA (second author) for writing the smoothing procedure, helping with three dockers composition, maintenance and docker networks, finding the ISOFIT integration best practice
#Federico Filipponi @ CNR-IGAG for his coregistration procedure made with Arosics and GDAL, for the maintenance of the first version of the Docker Container and any hardware-related solution
#Giandomenico De Luca @ CNR-IBE for advice on versions of GDAL and Arosics and for injection of L0 products
#Riccardo Canazza @ CNR-IREA for advice in regrid procedure
#Gabriele Candiani @ CNR-IREA for advisory in naming convention, metadata quality and visual check of results
#Rodolfo Ceriani @ UNIMI-DISAA for user-advisory
#Mirco Boschetti @ CNR-IREA for accelerating the path
#Monica Pepe @ CNR-IREA for guiding the whole procedure, scientific knowledge and coordination
#AROSICS: https://github.com/GFZ/arosics distributed under Apache-2.0 license
#GDAL: https://gdal.org/en/stable distributed under MIT license
#ISOFIT: https://isofit.github.io/isofit/4.1.0/ distributed under Apache-2.0 license
#Lorenzo Busetto @ CNR-IREA for prismaread package https://github.com/IREA-CNR-MI/prismaread distributed under GPL-3.0 license
#Giandomenico De Luca @ CNR-IBE https://doi.org/10.1016/j.isprsjprs.2024.07.003 https://doi.org/10.5281/zenodo.11547257
#Yulun Wu @ Ottawa University https://github.com/yulunwu8/tmart/blob/main/tmart/AEC/read_PRISMA_vaa.py distributed under GPL-3.0 license
#Spirito et al., 2026, Trends in Earth Observation, Volume IV, https://aitonline.org/wp-content/uploads/2026/07/Smart-Earth-Observation-for-a-Sustainable-Future.pdf distributed under Creative Commons AttributionNo Derivatives 4.0 International License
Download docker from https://www.docker.com/products/docker-desktop/. Install it and install WSL using the Docker procedure. After the installation is finished, restart your PC and open Docker. Download PRISTAR-GEOSPEC Release v0.9.0-beta and after unzipping this will be your config_folder. The maximum RAM used should be increased in the Docker configuration file. Create a file in C:\Users\<your_users>\.wslconfig and write inside:
[wsl2]
memory=24GBor any amount of memory you should maximally give to any Docker. Then in the terminal restart the wsl:
wsl --shutdownThe PRISTAR_GEOSPEC configuration file for the Docker is the config_folder/.env file. Set the amount of RAM you want to limit each docker. Then open the terminal inside that folder (open a terminal and use the cd command to put the directory of the config_folder) and run:
docker compose up -dThis will check your docker containers and if you are running it for the first time it will download all the dockers needed (namely AROSICS docker, ISOFIT docker and RStudio docker). Then open a browser (Chrome, Edge, Brave, Firefox, ...) and enter the following URL:
localhost:8787An Rstudio Server will be loaded. Go to the right panel and click over the setup as in the screenshot:
then put inside the box:
/config_folder/- (optional) in the
config_folder/DEMfolder you should put the DTM, the aspect and the slope rasters if you want to use theorthofeature and theisofitatmospheric correction. Each of these files should contain in the name respectivelydtm,aspect,slope. In the picture you see the expectedconfig_folder/DEMfolder content:
- (optional) in the
config_folder/master_image_for_regriddingfolder you should put the master image if you want to use theregridfeature and thecropfeature. The image should be in.tifformat. In the picture you see the expectedconfig_folder/master_image_for_regriddingfolder content:
- (mandatory) in the
config_folder/put_PRISMA_he5_and_S2_tif_herefolder you should put a folder for each image you want to process. Inside each of these folders there should be the PRISMA.he5file with the original name from ASI portal (starting withPRS). Then if you also want to usecoregororthofeature then you also need to put here a Sentinel-2 single-band image with the band you want to use to do the coregistration (seePRS_band_for_coregto match to the PRISMA image band used for coregistration). The S2 image should have in its nameS2ors2and should be a.tifimage. In the picture you see the expectedconfig_folder/put_PRISMA_he5_and_S2_tif_herefolder content:
An example of content of the config_folder/put_PRISMA_he5_and_S2_tif_here/PRS_L1_STD_OFFL_20240928 for PRISMA image reading and coregistration should be:
You will see a list of files. Click on main.R. Here you will see the script configuration file where you can manage the processing of the images. Here is the list of the parameters with their explaination:
regrid_option: when using theregridstep this will be the regriding method, namelyNfor nearest neighbour,Cfor cubic-spline andBfor bilinear. If you don't know the defaultNwill be a conservative choice;full_230_bands: when using thesmoothstep this will interpolate the bad bands (ifTRUE) or will just remove the bad bands (ifFALSE);PRS_band_for_coreg: when using thecoregstep this will be the band number to use for coregistration procedure;shift: when using thecoregstep this will enable the rigid shift of the image (ifTRUE);shift_x: whenshiftisTRUE, this will be the meters of the shift along x-axis in the UTM projection;shift_y: whenshiftisTRUE, this will be the meters of the shift along y-axis in the UTM projection;n_threads: the maximum number of cores to be used in the smoothing and in the ISOFIT procedures;aod_fixed: when using theisofitstep this will make you use the ISOFIT automatic estimation of Aerosol Optical Depth (AOD) or will try to fix the AOD in the atmospheric correction process to the best NASA Giovanni AOD value for each PRISMA image;procedure_order: a vector containing the list of all the processing steps in the order you want them. There is already a suggestion for L0, L1 and L2 products, but you can use it as LEGO building blocks.
After putting all these data inside then you can run everything clicking on Source in the upper right corner of the script.
Use cases for:
- L0 products:
procedure_order <- c("inject","read","cloud","coreg","isofit","regrid","smooth","crop")- L1 products:
procedure_order <- c("read","cloud","coreg","isofit","regrid","smooth","crop")- L2 products:
procedure_order <- c("read","coreg","regrid","smooth","crop")Just a note: PRISTAR-GEOSPEC will save each intermediate step, so don't worry if you want to stop before smoothing or cropping.
Use case:
- you want read a L0 PRISMA image. Put
data_SubAcq3_C_SWIR_SURFACE-OBS_Part0_S11.h5anddata_SubAcq3_C_VNIR_SURFACE-OBS_Part0_S11.he5intoconfig_folder/put_PRISMA_he5_and_S2_tif_herefolder. Then choose a L1 PRISMA image with same or similar view angle to the L0 product and put its.he5file inside theconfig_folder/put_PRISMA_he5_and_S2_tif_herefolder. Then use PRISTAR-GEOSPEC with:
procedure_order <- c("inject","read")- you want to read a L1 or L2 PRISMA image in
.he5format. Put your PRISMA file in.he5format in theconfig_folder/put_PRISMA_he5_and_S2_tif_herefolder. Then use PRISTAR-GEOSPEC with:
procedure_order <- c("read")- you want to read, generate cloud mask and atmospherically correct an L1 PRISMA image. Put your PRISMA file in
.he5format in theconfig_folder/put_PRISMA_he5_and_S2_tif_herefolder. Put the dtm, the aspect and the slope rasters in theconfig_folder/DEMfolder as separate files respectively withdtm,aspectandslopein their names. Then use PRISTAR-GEOSPEC with:
procedure_order <- c("read","cloud","isofit")- you want to read and coregister your L2 PRISMA image to a one-band Sentinel-2 image using gdalwarp. Put your PRISMA file in
.he5format and Sentinel-2 one-band image in.tifformat in theconfig_folder/put_PRISMA_he5_and_S2_tif_herefolder. To optimize coregistration, choose the PRISMA band most suitable for the one-band you chose for the Sentinel-2 image (e.g. 52nd PRISMA image band if I chose the B8 Sentinel-2 band). Then use PRISTAR-GEOSPEC with:
procedure_order <- c("read","coreg")
PRS_band_for_coreg <- 52- you want to read, generate cloud mask, coregister and atmospherically correct an L1 PRISMA image. Put your PRISMA file in
.he5format and Sentinel-2 one-band image in.tifformat in theconfig_folder/put_PRISMA_he5_and_S2_tif_herefolder. Put the dtm, the aspect and the slope rasters in theconfig_folder/DEMfolder as separate files respectively withdtm,aspectandslopein their names. Choose the PRISMA band for coregistration and if you want a validation for coregistration. Then use PRISTAR-GEOSPEC with:
procedure_order <- c("read","cloud","coreg","isofit")
PRS_band_for_coreg <- 52Inside the config_folder/put_PRISMA_he5_and_S2_tif_here folder you should have the list of PRISMA images folders (e.g L1 products):
If you open one of them you should find:
and if you open PRISTAR-processing folder you should find for the default L1 workflow:
Each folder contains the product in its name with the following naming convention:
- S: smoothing
- C: coregistration
- R: regridding
- O: orthoprojection
- T: trimming (cropping)
- A: atmospheric correction
- I: inject
that will appear in the filename in the order they have been performed from left to right.
Open an Issue over the GitHub page & write email to the authors.
