[Qgis-developer] Re: Raster providers

Marco Hugentobler marco.hugentobler at sourcepole.ch
Tue Jan 18 03:19:23 EST 2011


> I thought that if data type of the source is integer the provider
> could represent them as floating point. Byte can be represented as
> integer. Bad solution however.

Agreed, int to double conversion could be optimal.

What about an approach where the out-of-bound values are assigned the last 
value only if reprojection is used (and if the layer does not have a null 
value)? 

This would be quite similar to your current approach, except that people will 
have the appropriate raster appearance if they don't use reproj. And if they 
do, they have an undesired border, but still the right colors in the raster 
area.

Regards,
Marco 

Am Montag, 17. Januar 2011, um 17.34:22 schrieb Radim Blazek:
> On Mon, Jan 17, 2011 at 10:06 AM, Marco Hugentobler
> <marco.hugentobler at sourcepole.ch> > Using NaN sounds like a good idea
> and Qt has platform independent support for
> 
> > it (qIsNan & co.).
> > All other solutions I can think of seem to be more complicated (e.g.
> > force a transparency value only if raster is reprojected).
> > 
> >>float + NaN for byte/int?
> >>
> > This is not clear to me. Could you explain your approach for byte/int?
> 
> I thought that if data type of the source is integer the provider
> could represent them as floating point. Byte can be represented as
> integer. Bad solution however.
> 
> Radim


-- 
Dr. Marco Hugentobler
Sourcepole -  Linux & Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
marco.hugentobler at sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee


More information about the Qgis-developer mailing list