Le samedi 09 mars 2013 02:20:55, Allen Kempe a écrit :
> In my application, I would like to be able to programatically specify
> which driver to use when opening a GDALDataset when more than one driver
> can process the file. To do this, I have deregistered the drivers that I
> don't want to use. T
Frank,
Thanks for the response.
I've tried variations of [] and (), with and without alpha (3 or 4 values), and
with various values ranging from 0 to 255. They all have failed so it seems i'm
doing something fundamentally wrong.
Traceback (most recent call last):
File "makecolortable.py", l
In my application, I would like to be able to programatically specify
which driver to use when opening a GDALDataset when more than one driver
can process the file. To do this, I have deregistered the drivers that I
don't want to use. The GetGDALDriverManager-::DeregisterDriver()
function doe
On Fri, Mar 8, 2013 at 2:05 PM, Robert Nix wrote:
> Let me adjust my question. I changed the color-table code to:
>
> c = gdal.ColorTable(gdal.GCI_PaletteIndex)
> n = c.SetColorEntry(1,[255,128,0,0])
> m = c.SetColorEntry(65535,[0,128,255,255])
> c.CreateColorRamp(1,n,65535,m)
> band.SetColorTable
Folks,
Somewhat belatedly I've been thinking about things students could
do this year for Google Summer of Code and put a few ideas at:
http://trac.osgeo.org/gdal/wiki/SummerOfCode
Feel free to extend, or to promote doing summer of code for GDAL
or other OSGeo projects to those who might be go
Let me adjust my question. I changed the color-table code to:
c = gdal.ColorTable(gdal.GCI_PaletteIndex)
n = c.SetColorEntry(1,[255,128,0,0])
m = c.SetColorEntry(65535,[0,128,255,255])
c.CreateColorRamp(1,n,65535,m)
band.SetColorTable(c)
I discovered that the 64K colors are due to the UInt16 (tes
Hi,
I'm trying to add a color table to a 1-band UInt16 GeoTiff with Python as
follows:
import numpy as np
import gdal
driver = gdal.GetDriverByName('GTiff')
dst_ds = driver.Create('testcolor.tif', 100, 100, 1, gdal.GDT_UInt16)
band = dst_ds.GetRasterBand(1)
band.SetRasterColorInterpretation(gd
Added a ticket with the proposed implementation patch. Let me know how you
like it.
http://trac.osgeo.org/gdal/ticket/5021
Best regards,
Tamas
2013/3/2 Even Rouault
> Le vendredi 01 mars 2013 20:57:43, Tamas Szekeres a écrit :
> > 2013/3/1 Even Rouault
> >
> > > There's even a 4th option t