[postgis-devel] [EXTERNAL] Re: Postgis documentation clarification request.

Birkett, Scott scott.birkett at pioneer.com
Fri Feb 23 12:30:25 PST 2018


    "If no band is specified or any of specified bands does not exist in
    the raster, then will try to use all bands."

That would be very helpful in this situation.

On 2/23/18, 1:42 PM, "postgis-devel on behalf of Mateusz Loskot" <postgis-devel-bounces at lists.osgeo.org on behalf of mateusz at loskot.net> wrote:

    On 23 February 2018 at 19:42, Birkett, Scott <scott.birkett at pioneer.com> wrote:
    >
    > Please consider adding documentation to explain why the following SQL
    > statement returns true.
    > [...]
    > ( ST_AsTiff(raster, ARRAY[1,2]) = ST_AsTiff(raster, ARRAY[3]) ) appears to
    > evaluate to true because any raster band selection on a band that doesn’t
    > exists (ARRAY[3] in this example) returns ALL the raster bands.
    > [...]
    > I am not asking for ST_Band or ST_AsTiff to change functionality, but if the
    > documentation https://postgis.net/docs/RT_ST_AsTIFF.html made it apparent
    > that parameter integer[] nbands fetches you ALL the bands when band request
    > are made that don’t exists might help people of the future.

    Your discovery is correct.
    If any of band indices are out of the range of number of available bands,
    then complete original raster is returned.
    BTW, this is derivative of how ST_Band behaves.

    Would changing the docs statement

    "If no band is specified, then will try to use all bands."

    to read something like:

    "If no band is specified or any of specified bands does not exist in
    the raster, then will try to use all bands."

    ?

    Best regards,
    --
    Mateusz Loskot, http://mateusz.loskot.net
    _______________________________________________
    postgis-devel mailing list
    postgis-devel at lists.osgeo.org
    https://lists.osgeo.org/mailman/listinfo/postgis-devel



This communication is for use by the intended recipient and contains information that may be Privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of this e-mail,in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. Unless explicitly and conspicuously designated as "E-Contract Intended", this e-mail does not constitute a contract offer, a contract amendment, or an acceptance of a contract offer. This e-mail does not constitute a consent to the use of sender's contact information for direct marketing purposes or for transfers of data to third parties. Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean http://www.DuPont.com/corp/email_disclaimer.html


More information about the postgis-devel mailing list