Closed tdipisa closed 3 years ago
@taba90 let's dot he usual work-flow:
The project and project code are:
ALMAVIVA | C183-ALMAVIVA-2020-GeoNode-DEV |
---|
@nmco as reported from Jose in the linked issue it seems a problem with the CoverageInfo definition of the nurc:mosaic layer.
@jemacchi creates this JIRA ticket, which is very vague.
We have two situations here:
Not much right now, but a note, the layer in question has been added in the data directory easily 15 years ago, and might have a configuration that is at least odd by today's standards. That said, the process should not be failing because of it... if the size information is not available from the coverage band details, it can be gathered from GridCoverage2DReader.getImageLayout().getSampleModel()
(and likely more reliable than information cached in the config).
Thank you for the feedback @aaime, two bits are not clear to me (I don't know much about this APIs):
If I got he above right, I would suggests that we update the download the process to get the size form the image layout if bands details are not available, what's your estimate for this @taba90 ?
It happens for that specific very old layer for sure... and probably every other raster layer having a similar age (data dirs keep on getting upgraded and migrated, there are some very old ones out there). It's probably a small percentage of layers out there, but quite likely there are others around.
@nmco as pointed by @aaime the reader.getImageLayout().getSampleModel() allows to retrieve the size information. The doubt I have is regarding mosaic data. In that case the ImageLayout is always null for the underlying RasterManager. It try to build it from the MosaicConfigurationBeanto colorModel and SampleModel, but thos attributes are allways null. The only way to retrieve the missing size information looks to me that would be to invoke the read method of the CoverageReader by I guess it is not a desired option.
@taba90 weird, the sample image on disk shoudl contain also a image layout, right @dromagnoli ?
Yep @aaime . the rasterManager is indeed loading the default ImageLayout from that sample image. However, as you said, that dataset is probably there since 15 years ago when no sample_image was around. the nurc_mosaic directory is indeed missing the sample_image
Another possibility is just to log a warning and don't try to apply size limits to data that does not want to help :-D
Thank you @aaime, @dromagnoli and @taba90 for the feedback.
I would suggests that we fix the GeoServer data directory and then if this situation happen again, let's see what we can do code wise.
@taba90 was the directory fixed? if not let's do it its a quick thing and will avoid nay future misunderstanding.
While testing the gs:Download process through the new MapStore export tool I found the following issue that has been originally reported in this MapStore issue.
There is a GeoServer error if I try to export the nurc:mosaic raster layer (it seems related to an issue previously reported here).
Request URL: https://gs-stable.geo-solutions.it/geoserver/wps?service=WPS&version=1.0.0&REQUEST=Execute&authkey=41db6295-c6df-4384-ad5b-edea0f4acf5b
Request body:
GeoServer response:
Using the layer gs:ETOPO_Shadow everything seems to work fine (with the exception of the problem reported here).