raster layer properties and mask patches

Jonathan Coles jonathan at jpcoles.com
Wed Jan 26 22:07:28 CET 2005


Am Mittwoch, den 26.01.2005, 12:21 -0500 schrieb Jonathan Coles:
> Am Mittwoch, den 26.01.2005, 11:44 -0500 schrieb Jonathan Coles:
> > agreed. in fact, i think that gdal supports specifying NO_DATA values as
> > complex numbers. i imagine that the color bands will all be real values,
> > so it could be possible to distinguish what truly is part of the
> > original image. ProjectRasterFile could return the image array and also
> > a mask array.
> > 
> > this will take some time to prepare because the interface that we
> > currently use for the warping code is the "simple" version, which
> > doesn't allow for things such as specifying NO_DATA values as complex
> > numbers. for now, do you think that what i currently have is an
> > acceptable half way point? at least people are able to overlay images.
> 
> 
> better still: gdal supports alpha bands. this should really simplify the
> code. i'll start investigating it.

ok, bernhard (h.), you got exactly what you wanted :)

In addition to returning RGB values for a projected image,
ProjectRasterFile also returns an array to be used as an image mask.
gdal generates this if some options are given to create an alpha band.
as before (and not surprisingly), rendering is slightly slower when
masking is turned on.

i changed the rest of the code to support this. for example, the raster
properties dialog only asks if you want to use a mask, and only that
flag is saved. 

to reduce the number of patches, i threw out the Color2hex and hex2Color
functions and the associated tests.

the patches are attached in a tar.gz file so the email doesn't get
blocked.

--jonathan

-- 
=====================================================================
 Jonathan Coles                               http://www.jpcoles.com
 jonathan at jpcoles.com                    GnuPG Key: /gpg_pub_key.asc
=====================================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patches.tar.gz
Type: application/x-compressed-tar
Size: 19360 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20050126/c689009d/patches.tar.gz


More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)