Hi,

What is the question? TIFF files can have either internal or external overviews 
and if client supports them it is much faster to render the image at small 
scales. I have no idea about what readers can handle internal/external 
overviews but I can arrange test images easily.
External overviews are not very common but because they are external they are 
handy for testing what resampling method feels best. Also it is easier to 
delete the .ovr file than the internal overviews if user wants to archive the 
image and save the 30% of disk space that overviews take.

-Jukka Rahkonen-

Lähettäjä: Giuseppe Aruta <giuseppe.ar...@gmail.com>
Lähetetty: tiistai 22. syyskuuta 2020 17.19
Vastaanottaja: OpenJump develop and use <jump-pilot-devel@lists.sourceforge.net>
Aihe: Re: [JPP-Devel] SVN: [6507] core/trunk/src/org/openjump/core/rasterimage

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 
<edgar.sol...@web.de<mailto:edgar.sol...@web.de>> 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
Jump-pilot-devel@lists.sourceforge.net<mailto: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

Reply via email to