I reverted the changes. I didn't find a valid way. Il giorno lun 14 set 2020 alle ore 11:49 Giuseppe Aruta < giuseppe.ar...@gmail.com> ha scritto:
> Hi Ede, > can you check if this modification fits memory problems? > a) On loading TIF (RasterImageIO and TiFFUtils class) I get the envelope > directly tiff metadata > b) on the other tools I reuse the previous method > > Il giorno lun 14 set 2020 alle ore 10:49 <edgar.sol...@web.de> ha scritto: > >> Peppe, >> >> i noticed earlier that your image reading implementation creates a new >> Reader on every render call but thought you will notice when this becomes a >> performance issue. >> >> seeing you continue this trend with code like below i become a little >> worried ;) and suggest you try to model your approach using class instances >> keeping the reference to be reused hence saving additional file access. >> easiest would be a "caching" holding the ReferencedImageReader object in a >> HashMap with the path value as key. remember to close it properly if the >> layer is removed! >> >> this also may become a memory issue as i am not sure that all file >> handles are closed automatically this way. ..sunshine ede >> >> >> On 9/14/2020 9:51, jump-pilot-svn--- via Jump-pilot-devel wrote: >> > + /** >> > + * Get Envelope from file >> > + * @param fileName >> > + * @return Envelope >> > + * @throws ReferencedImageException >> > + */ >> > + >> > + public static Envelope getGeoReferencing(String fileName) throws >> ReferencedImageException { >> > + GeoReferencedRaster geoRaster = new >> GeoReferencedRaster(new File(fileName).toURI().toString()); >> > + return geoRaster.getEnvelope(); >> > + >> >> >> >> _______________________________________________ >> Jump-pilot-devel mailing list >> Jump-pilot-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >
_______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel