Opened 14 years ago

Closed 14 years ago

#2932 closed patch (fixed)

GdalTools: improve Build Overviews dialog by adding more options, and translatable Translate dialog

Reported by: dcarreira Owned by: brushtyler
Priority: minor: annoyance Milestone: Version 1.6.0
Component: Build/Install Version: Trunk
Keywords: GdalTools, GDAL Cc: brush.tyler@…
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

Enable the following options in Build Overviews:

  • Clean overviews (GDAL >=1.7.0)
  • Overviews with JPEG compression,
  • Define quality for JPEG compression (GDAL =>1.7.0)
  • Use ERDAS Imagine format (.aux) file


Also, small correction to Translate to allow translation of 2 error messages (added self.tr).

Duarte

Attachments (1)

patch_for_ticket_2932.diff (7.3 KB ) - added by dcarreira 14 years ago.
Expanded dialog for Overviews. Translate with 2 translatable messages. Version bump to 1.2.10.

Download all attachments as: .zip

Change History (5)

by dcarreira, 14 years ago

Attachment: patch_for_ticket_2932.diff added

Expanded dialog for Overviews. Translate with 2 translatable messages. Version bump to 1.2.10.

comment:1 by brushtyler, 14 years ago

Status: newassigned

Should the JPEG quality be enabled only if the "Overviews in TIFF with JPEG compression" is checked, isn't it?

And if the input image is not a GeoTIFF, what happen? We should disable the "Overviews in TIFF..." checkbox in that case. By testing the input file format, if it's not Erdas Imagine we can disable/enable also the "overview in .aux file".

We have to mind about this before applying the patch. Your opinions?

in reply to:  1 ; comment:2 by dcarreira, 14 years ago

Replying to brushtyler:

Should the JPEG quality be enabled only if the "Overviews in TIFF with JPEG compression" is checked, isn't it?

And if the input image is not a GeoTIFF, what happen? We should disable the "Overviews in TIFF..." checkbox in that case. By testing the input file format, if it's not Erdas Imagine we can disable/enable also the "overview in .aux file".

I think external ovrs are always in a tiff file, that can have a jpeg compression. gdaladdo page states that: "(...)file with the extension .ovr that is actually in TIFF format"

And an ERDAS file can be created instead. So the option "Overviews in TIFF..." should always be available. The same would apply to the Erdas option. It should be available regardless of the original's format.

I'm not sure what GDAL does if the original file is a MrSID, ECW or JP2, which have internal overviews already. Can it create external ovrvs? I don't know. Maybe in this case, JPEG compression would not work?

As for the sub-option "JPEG Quality", I think it only makes sense when you choose to create the external ovr with JPEG compression, so it seems correct to me as it is.

We have to mind about this before applying the patch. Your opinions?

I confess I did not try to catch incompatible settings, since GDAL will catch those already and GdalTools reports those errors to the user.

in reply to:  2 comment:3 by brushtyler, 14 years ago

Replying to dcarreira:

Replying to brushtyler:

Should the JPEG quality be enabled only if the "Overviews in TIFF with JPEG compression" is checked, isn't it?

And if the input image is not a GeoTIFF, what happen? We should disable the "Overviews in TIFF..." checkbox in that case. By testing the input file format, if it's not Erdas Imagine we can disable/enable also the "overview in .aux file".

I think external ovrs are always in a tiff file, that can have a jpeg compression. gdaladdo page states that: "(...)file with the extension .ovr that is actually in TIFF format"

And an ERDAS file can be created instead. So the option "Overviews in TIFF..." should always be available. The same would apply to the Erdas option. It should be available regardless of the original's format.

I'm not sure what GDAL does if the original file is a MrSID, ECW or JP2, which have internal overviews already. Can it create external ovrvs? I don't know. Maybe in this case, JPEG compression would not work?

As for the sub-option "JPEG Quality", I think it only makes sense when you choose to create the external ovr with JPEG compression, so it seems correct to me as it is.

We have to mind about this before applying the patch. Your opinions?

I confess I did not try to catch incompatible settings, since GDAL will catch those already and GdalTools reports those errors to the user.

Ok, I'm going to apply the patch.

The only change I'm doing is to convert the "overview in TIFF with JPEG..." to a groupbox (see the Translate's creation options) so we avoid to enable/disable the "JPEG Quality" by code.

comment:4 by brushtyler, 14 years ago

Resolution: fixed
Status: assignedclosed

Patch applied (r14105). I kept the widget containing the "JPEG Quality" (as in your patch), without change it to a groupbox.

Note: See TracTickets for help on using tickets.