[Qgis-developer] Developer cookbook in SVN

Benoit de Cabissole benoit at exigesa.com
Mon Aug 9 13:10:58 EDT 2010


Hi all,

The cookbook is a very good idea. Thanks to set it up!

I've got a problem with the recipe in the raster, Single Band Rasters
section. The code shown to do colormap does not fully work: the layer is
told to use a ColorRampShader, then a custom raster shader function is
initialised and filled with relevant data (a list and flag) and then
nothing. How is this custom function fed back into the raster? Am I missing
something?

In my code I tried to use:
   theLayer.setRasterShaderFunction( myShaderFunction )
but it only causes an "access violation" error when QGIS exits.

After testing the code in the cookbook I can confirm that a colormap is
created: the colormap tab is filled with the correct colour ramp but the
type of colouring (symbology tab, color map combobox) is not changed to
'Colormap', it stays at whatever setting it was before calling the code and
needs to be manually witched to "Colormap" to have the raster taking the
colours of the colormap.

Could you please complete the code in the cookbook to show the final step?

Using QGIS 1.6.R14026 on WinXP under OSGeo4W.

Best regards,
Benoit


> -----Original Message-----
> From: qgis-developer-bounces at lists.osgeo.org
> [mailto:qgis-developer-bounces at lists.osgeo.org]On Behalf Of Otto Dassau
> Sent: Monday, 09 August 2010 10:21
> To: Martin Dobias
> Cc: qgis-dev
> Subject: Re: [Qgis-developer] Developer cookbook in SVN
>
>
> Am Sat, 7 Aug 2010 22:45:50 +0200
> schrieb Martin Dobias <wonder.sk at gmail.com>:
>
> > Hi Tim
> >
> > On Sat, Aug 7, 2010 at 10:24 PM, Tim Sutton <lists at linfiniti.com> wrote:
> > > Hi Martin
> > >
> > > This is a brilliant resource. We should be able to host it within the
> > > qgis osgeo vm too if needed - do you need to do anything special to
> > > build it other than apt-get install the sphinx binary.
> >
> > You're right, it could be put into qgis VM. It needs just the sphinx
> > binary and a cron entry which would run 'make html' regularly.
> >
> > > Could we theme
> > > it to look like our other documentation resources & web site - Werner
> > > / Otto would you have time & inclination to look at that?
>
> yes, I can have a look the next days.
>
>  Otto
>
> > Theming should be easy:
> > http://sphinx.pocoo.org/theming.html
> >
> > > And how do we generate pdf's?
> >
> > Just tried it:
> > make latex
> > cd build/latex
> > make all-pdf
> >
> > It results in a great looking PDF.
> >
> > Bye
> > Martin
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the Qgis-developer mailing list