[gdal-dev] gdaladdo without explicit factors specified

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[gdal-dev] gdaladdo without explicit factors specified

Even Rouault-2

Hi,

 

I'm pretty sure this must have annoyed a lot of people. When you run gdaladdo, you need to specify the appropriate overview levels. Generally you use power-of-two factors, but the question is then: what is the last relevant factor given the dimension of my file size ?

 

I've a ready to commit improvement where you can just do :

gdaladdo [other options] my.tif

and it will compute the appropriate power of two factors until the smallest overview is smaller or equal to 256x256 (this threshould can be adjusted with a new -minsize switch. Actually it should be named -maxminsize, since this is the maximum size of the smallest overview, but I guess -minsize will be clear enough)

 

The effect of this patch is the same as specifying manually all the overview factors implicitly computed. That means existing overview levels will be recomputed if their factor match one of the implicitly computed factors. Or they will be left unchanged if not matching one of the implictly computed overview factors.

 

Thoughts ?

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gdaladdo without explicit factors specified

geowolf
On Wed, Jun 28, 2017 at 2:10 PM, Even Rouault <[hidden email]> wrote:

Thoughts ?


/me likes :-)

-- 

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

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility  for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.



_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gdaladdo without explicit factors specified

jmckenna
Administrator
In reply to this post by Even Rouault-2
On 2017-06-28 9:10 AM, Even Rouault wrote:

> Hi,
>
> I'm pretty sure this must have annoyed a lot of people. When you run
> gdaladdo, you need to specify the appropriate overview levels. Generally
> you use power-of-two factors, but the question is then: what is the last
> relevant factor given the dimension of my file size ?
>
> I've a ready to commit improvement where you can just do :
>
> gdaladdo [other options] my.tif
>
> and it will compute the appropriate power of two factors until the
> smallest overview is smaller or equal to 256x256 (this threshould can be
> adjusted with a new -minsize switch. Actually it should be named
> -maxminsize, since this is the maximum size of the smallest overview,
> but I guess -minsize will be clear enough)
>
> The effect of this patch is the same as specifying manually all the
> overview factors implicitly computed. That means existing overview
> levels will be recomputed if their factor match one of the implicitly
> computed factors. Or they will be left unchanged if not matching one of
> the implictly computed overview factors.
>
> Thoughts ?
>

I agree with Andrea.  I've been copy/pasting the command with the
power-of-2 levels for almost 2 decades it seems ha, and I am sure 99% of
the users do the same.  This is a great addition!

-jeff



_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [gdal-dev] gdaladdo without explicit factors specified

jratike80
In reply to this post by Even Rouault-2
Even Rouault-2 wrote
Hi,

I'm pretty sure this must have annoyed a lot of people. When you run gdaladdo, you need to
specify the appropriate overview levels. Generally you use power-of-two factors, but the
question is then: what is the last relevant factor given the dimension of my file size ?
...

Thoughts ?
Excellent idea especially because it works in scripts also with variable sized images. My second thought is that is there any living soul in the World who can memorize "--config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL" without going to http://www.gdal.org/gdaladdo.html or by re-using their old scripts?

-Jukka Rahkonen-
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gdaladdo without explicit factors specified

Even Rouault-2
In reply to this post by Even Rouault-2

On mercredi 28 juin 2017 14:10:17 CEST Even Rouault wrote:

> Hi,

>

> I'm pretty sure this must have annoyed a lot of people. When you run

> gdaladdo, you need to specify the appropriate overview levels. Generally

> you use power-of-two factors, but the question is then: what is the last

> relevant factor given the dimension of my file size ?

>

> I've a ready to commit improvement where you can just do :

> gdaladdo [other options] my.tif

> and it will compute the appropriate power of two factors until the smallest

> overview is smaller or equal to 256x256 (this threshould can be adjusted

> with a new -minsize switch. Actually it should be named -maxminsize, since

> this is the maximum size of the smallest overview, but I guess -minsize

> will be clear enough)

>

> The effect of this patch is the same as specifying manually all the overview

> factors implicitly computed. That means existing overview levels will be

> recomputed if their factor match one of the implicitly computed factors. Or

> they will be left unchanged if not matching one of the implictly computed

> overview factors.

>

> Thoughts ?

 

Just committed into trunk

 

>

> Even

 

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Loading...