[gdal-dev] Re: Gdal_translate, question from an amateur.

Brian Case rush at winkey.org
Sun Oct 23 17:19:52 EDT 2011


Joolek,


gdal_translate cannot look at 3 bands at a time, -scale 0 255 1 254 will
scale each band separately, therefore 0 255 0 would become 1 254 1.

At one point I thought perhaps you were trying to get rid of a border,
but now I don't think thats the issue.

Brian



On Sun, 2011-10-23 at 11:53 -0700, joolek wrote:
> Hmm...  So what the following does : 
> gdal_translate -scale 0 <a href="tel:254%200%20255">254 0 255 <input>
> <output>
> 
> 
> Thank you
> J
> 
> 
> 23 Oct 2011, at 19:20, "Jay L. [via OSGeo.org]" <[hidden email]>
> wrote:
> 
> 
> 
> > I do not believe that a GDAL command line tool to perform that
> > function exists.  The task is achievable using GDAL and Numpy masked
> > arrays in python.
> > 
> > 
> > Perhaps someone else knows of a GDAL tool to perform this
> > functionality though.
> > 
> > 
> > J
> > 
> > On Sun, Oct 23, 2011 at 12:59 PM, joolek <[hidden email]> wrote:
> >         Hi
> >         I need to convert all the 255 255 255 into 254 254 254. Is
> >         this possible?
> >         PS. Do appologize for lack of my language. 
> >         
> >         
> >         Thanks
> >         J
> >         
> >         On 23 Oct 2011, at 15:26, "Jay L. [via OSGeo.org]" <[hidden
> >         email]> wrote:
> >         
> >         
> >         
> >         > Or are you trying to convert only some of the pixels to
> >         > white?
> >         > 
> >         > 
> >         > On Sun, Oct 23, 2011 at 10:02 AM, Brian Case <[hidden
> >         > email]> wrote:
> >         > 
> >         >         joolek,
> >         >         
> >         >         I noticed you used the word "strip". Are you
> >         >         trying to remove portions
> >         >         of the image that are all black or white?
> >         >         
> >         >         
> >         >         
> >         >         
> >         >         On Sun, 2011-10-23 at 03:01 -0700, joolek wrote:
> >         >         > Basically - I have an imagery with RGB 0-255,
> >         >         but I would like to strip it to
> >         >         > 1-254.
> >         >         > So i want to get rid off two extremes (0 and
> >         >         255) - is this possible?
> >         >         > Thank you
> >         >         > J
> >         >         >
> >         >         > --
> >         >         > View this message in context:
> >         >         http://osgeo-org.1803224.n2.nabble.com/Gdal-translate-question-from-an-amateur-tp6921127p6921730.html
> >         >         > Sent from the GDAL - Dev mailing list archive at
> >         >         Nabble.com.
> >         >         > _______________________________________________
> >         >         > gdal-dev mailing list
> >         >         
> >         >         > [hidden email]
> >         >         
> >         >         > http://lists.osgeo.org/mailman/listinfo/gdal-dev
> >         >         
> >         >         
> >         >         _______________________________________________
> >         >         gdal-dev mailing list
> >         >         
> >         >         [hidden email]
> >         >         http://lists.osgeo.org/mailman/listinfo/gdal-dev
> >         >         
> >         > 
> >         > 
> >         > _______________________________________________ 
> >         > gdal-dev mailing list 
> >         > [hidden email] 
> >         > http://lists.osgeo.org/mailman/listinfo/gdal-dev 
> >         > 
> >         > 
> >         > __________________________________________________________
> >         > If you reply to this email, your message will be added to
> >         > the discussion below:
> >         > http://osgeo-org.1803224.n2.nabble.com/Gdal-translate-question-from-an-amateur-tp6921127p6922091.html 
> >         > To unsubscribe from Gdal_translate, question from an
> >         > amateur., click here. 
> >         
> >         
> >         ____________________________________________________________
> >         View this message in context: Re: Gdal_translate, question
> >         from an amateur.
> >         
> >         
> >         Sent from the GDAL - Dev mailing list archive at Nabble.com.
> >         
> >         
> >         _______________________________________________
> >         gdal-dev mailing list
> >         [hidden email]
> >         http://lists.osgeo.org/mailman/listinfo/gdal-dev
> > 
> > 
> > 
> > _______________________________________________ 
> > gdal-dev mailing list 
> > [hidden email] 
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev 
> > 
> > 
> > ____________________________________________________________________
> > If you reply to this email, your message will be added to the
> > discussion below:
> > http://osgeo-org.1803224.n2.nabble.com/Gdal-translate-question-from-an-amateur-tp6921127p6922518.html 
> > To unsubscribe from Gdal_translate, question from an amateur., click
> > here. 
> 
> 
> ______________________________________________________________________
> View this message in context: Re: Gdal_translate, question from an
> amateur.
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev




More information about the gdal-dev mailing list