Hi Lorenzo,
it's because GeoTiffReader returns a deferred loading image, that is not
really
read in memory, but has a connection to the source file and reads tiles on
demand.

The ability to serializing a GridCoverage2D really depends on how
serializable
the RenderedImage inside of it is. In general, we never use serialization,
but
write the coverage to a suitable output format (e.g., using the
GeoTiffWriter for
example). It's not a general mechanism, each format has its own limitations,
no format that I'm aware of allows to save random image types, but GeoTiff
normally provides good coverage for most sample models and color models.

Hope this helps

Cheers
Andrea

On Wed, Jan 6, 2021 at 2:58 PM Lorenzo Di Giacomo <loridi...@gmail.com>
wrote:

> Hi, i was trying to serialize a GridCoverage2D (read from file using
> GeoTiffReader) with the same snippet used in "GridCoverageTestBase.java",
> but
> when i try to do it i always get "java.lang.RuntimeException:
>
> it.geosolutions.imageio.stream.input.FileImageInputStreamExtImplNon-serializable
> parameter in this operation`s ParameterBlock."
> Do you know why is this happening? Thanks
> _______________________________________________
> GeoTools-Devel mailing list
> GeoTools-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>


-- 

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-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to