[Gdal-dev] Block size consistency (and SetColorInterpretation()
sjahputerao at missouri.edu
Wed Feb 7 14:51:29 EST 2007
Aha, so there is a way to set the photometric interpretation in GTiff,
even if this is to be done during file creation. Yes, I just want to
give a simple label for the bands in the new GTiff file I created using
I suspect the PHOTOMETRIC=RGB will have to be set in the parameter
char ** /papszParmList
/in Create()? Where do I set this parameter? Where can I find more
details on the format of /papszParmList?/
Frank Warmerdam wrote:
> Ozy Sjahputera wrote:
>> You are probably right. I am just trying to rule out any possible
>> source of image "shift" that I am seeing.
>> Using RasterIO instead of block write/read seems to increase my
>> computation time by 40-50%. If I find the source of error to be
>> something else unrelated to block size, I will go back to using
>> blockWrite/Read. Still looking now.
> Whew, that is substantial overhead. I'm surprised, and somewhat
>> Frank, one more thing, when I use "Create()" from "GTiff" driver, I
>> cannot assign the band name in the new image using :
>> I always get : ERROR 6: SetColorInterpretation() not supported for
>> this dataset. However, the first band in the new image seems to have
>> "gray" as the band name, while others are "undefined" due to the
>> error above.
>> But I can do SetColorInterpretation() above if I use "Create()" from
>> "MEM" driver.
>> Is this a limitation of GTiff driver in GDAL now? Is there a way I
>> can assign the band name after using "Create()" from GTiff driver?
> There is a distinct concept of band names (descriptions). But here
> you just seem interested in photometric intepretation.
> The GeoTIFF driver has very limited support for setting the photometric
> interpretation of bands after the file has been created. I think the
> only aspect of this that actually does something is if you set an
> extra band to be alpha, it records that in the TIFF file.
> If you would like a 3 or more band file to have a TIFF level photometric
> interpretation of RGB you can set it using the PHOTOMETRIC=RGB creation
> option at Create() time.
> This is an example of a situation where Create() then modify doesn't
> work well due to lots of stuff getting locked down at the point the
> create is completed.
> Best regards,
More information about the Gdal-dev