YES!! I did it, was a little tricky with all those classes and
sub-classes but this did the trick:
            RenderedOp ro = (RenderedOp) grid.getRenderedImage();
            PlanarImage planarImage = ro.getCurrentRendering();
            ImageReader reader = (ImageReader)
planarImage.getProperty("JAI.ImageReader");
            FileImageInputStreamExtImpl input =
(FileImageInputStreamExtImpl) reader.getInput();

Il giorno mer 23 giu 2021 alle ore 18:03 Andrea Aime <
andrea.a...@geo-solutions.it> ha scritto:

> Hi,
> in general no, because the GridCoverage2D is backed by a RenderedImage,
> which in turn
> could be a RenderedOp (it's a subclass) that is powered by a JAI
> processing chain.
> The chain could be doing anything, like generating data on the fly,
> mosaicking multiple files,
> or retrieving data from a remote server.
>
> For the cases where the chain is actually backed by a read operation, then
> you can
> use RenderedOp getters to walk torwars the sources of the chain, find an
> ImageRead operation,
> and check its parameter for the original source image.
>
> Cheers
> Andrea
>
>
> On Wed, Jun 23, 2021 at 5:14 PM Lorenzo Di Giacomo <loridi...@gmail.com>
> wrote:
>
>> Hi, if i dont get wrong the GridCoverage2D doesn't load in memory all the
>> content of the file but use a FileInputStream in order to load the content
>> of the file.
>> So, is there a way to know the file path associated to a GridCoverage2D
>> (if there is of course).
>> Thanks
>> _______________________________________________
>> GeoTools-GT2-Users mailing list
>> GeoTools-GT2-Users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
>
>
> --
>
> Regards, Andrea Aime
>
> == GeoServer Professional Services from the experts! Visit
> http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf
> Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa
> (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549
> http://www.geo-solutions.it http://twitter.com/geosolutions_it
> ------------------------------------------------------- *Con riferimento
> alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 -
> Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni
> circostanza inerente alla presente email (il suo contenuto, gli eventuali
> allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i
> destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per
> errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
> sarei comunque grato se potesse darmene notizia. This email is intended
> only for the person or entity to which it is addressed and may contain
> information that is privileged, confidential or otherwise protected from
> disclosure. We remind that - as provided by European Regulation 2016/679
> “GDPR” - copying, dissemination or use of this e-mail or the information
> herein by anyone other than the intended recipient is prohibited. If you
> have received this email by mistake, please notify us immediately by
> telephone or e-mail.*
>
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to