[Qgis-developer] Re: classification of rasters
Marco Hugentobler
marco.hugentobler at karto.baug.ethz.ch
Sat Mar 10 02:14:36 EST 2007
Hi Tim,
I did some experiments with classifications by evaluating value against a set
of classes. It slows down rendering a bit, but speed seems still acceptable
for a first version. I may return and try to enhance speed with color tables
later.
I'm trying to program a GUI for the classification now. I see two
possibilities:
A new tab called 'custom color map' in the raster layer properties, containing
the GUI elements to create a classification.
A button 'custom color map...' under the color map combo box. This would pop
up the dialog for creating the classification.
I'm more in favour of the first one, as it allows users to immediatly try out
the symbology by pressing 'apply'. What do you think?
Regards,
Marco
Am Montag, 5. März 2007 12:59 schrieb Tim Sutton:
> Hi Marco (cc Peter Ersts & Gary)
>
> 2007/3/5, Marco Hugentobler <marco.hugentobler at karto.baug.ethz.ch>:
> > Hi Tim,
> >
> > For the project I'm working on, I need to have the possibility to colour
> > a raster layer (e.g. a DEM) by building classes and assign a color to
> > each. Afaik there is no possibility to do so in QGIS. Can I implement it
> > in the raster transparency branch (even though it is not related to
> > transparency)?
>
> I think this is fine - any problem with this Peter? I am afraid if you
> do the work outside the branch, we will have difficulty merging
> everything later as we are making some quite big changes to raster -
> so your idea to work in the transparency branch is a good one.
>
> > I wonder what the best way is to implement this behaviour. UMN mapserver
> > preclassifies the expected values in a color table to make lookup faster
> > (http://mapserver.gis.umn.edu/docs/howto/raster_data). But it also seems
> > that their expressions for classifications can be more complicated than
> > simple comparison operations. So I'm probably going to start by
> > evaluating pixel values against a set of classes and see how the
> > performance behaves.
>
> The stuff I wrote for pseudocolour rendering of grayscale uses a
> similar approach - evaluate each pixel before rendering and decide
> algorithmically what colour to assign it (i.e. no lookup table). Radim
> also did some work in raster on lookup for palettes. Both aproaches
> seem to offer good performance - I think recent (>=QGIS 0.8) slowdowns
> in QGIS rendering relate to canvas changes.
>
> One of the things I am planning to do in tis branch is refactor raster
> into a bunch of smaller dedicated-purpose classes. We are keeping a
> list of our plans here:
>
> http://wiki.qgis.org/qgiswiki/RasterTransparencyBranch
>
> Having raster classification will be a great addition to QGIS btw!
>
> Will be good if you can do the same.
>
> Regards
>
> Tim
>
> > What do you think?
> >
> > Regards,
> > Marco
>
> --
More information about the Qgis-developer
mailing list