Let us wait for Michael and Jukka's opinion about it. I am not sure but possibly it was request by one of the member of the list years ago to Alberto De Luca who implemented this part of the code. I prefer to comment out and build a new clean method
Il giorno mar 22 set 2020 alle ore 15:29 <[email protected]> ha scritto: > > > On 9/22/2020 13:49, Giuseppe Aruta wrote: > >> + private static ImageAndMetadata readImage(File tiffFile, int > overviewIndex, int indexStart, Point originalSize, > >> + Resolution originalCellSize, Envelope wholeImageEnvelope, > Envelope viewportEnvelope, double noDataValue, > >> + Stats stats) throws IOException, > NoninvertibleTransformException { > >> + > >> + ImageInputStream imageInputStream = > ImageIO.createImageInputStream(tiffFile); > >> + Iterator<ImageReader> iterator = > ImageIO.getImageReaders(imageInputStream); > > > > this seems to be a leftover. we want to enforce a specific TIFF reader, > which seems not to be done here. > > > > why exactly are there two readImage() methods needed anyway? one should > suffice. can you remove it? > > > > Not sure. As it tries to read overviews of a file from an external .ovr > file. I have never used or found it in projects. Once I tried to save a > tiff with overviews using QGIS: I had back two files, a TIF and a OVR one. > But when I tried to load this couple into OpenJUMP, it took so long that I > gave up. AFAIR this was a request of many years ago from someone of the list > > why not remove it then, if it's not used or working anyway? if you want to > keep it, to have a go at it in the future, i'd suggest to at least to > deactivate it, just to make sure it is no code path used accidentially. > > a hack i use sometimes is to add > > // explain why! > if (true) throw new java.lang.UnsupportedOperationException(); > > before some code i want to deactivate. this way the code does not have to > be commented out and stays readable but will not be used anyway. > > ..ede > > > _______________________________________________ > Jump-pilot-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >
_______________________________________________ Jump-pilot-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
