speed of raster repainting

Russell Nelson nelson at crynwr.com
Fri Dec 31 07:27:19 CET 2004


I notice that raster repainting is fairly slow.  The raster needs to
be repainted whenever the layer order is changed or layer visibility
changes.  The time seems to be evenly split between ProjectRasterFile(),
and wxImageFromStream().  There is some room for improvement there, I
think.  ProjectRasterFile seems to be returning a BMP file, whereas it
could return a wxImage.  That would make the raster repaint twice as
fast.  Also, it could keep a cache of projected data, so if all the
parameters to ProjectRasterFile are the same, it would return the same
projected data.

Mapviewer only displays UTM maps, so it doesn't have to deal with
changing the projection.  Still, keeping an internal cache of tiles as
pixmaps, ready for drawing, lets me repaint 16 200x200 pixmaps at
least ten times per second.

-- 
--My blog is at angry-economist.russnelson.com  | Freedom means allowing
Crynwr sells support for free software  | PGPok | people to do things the
521 Pleasant Valley Rd. | +1 315-323-1241 cell  | majority thinks are
Potsdam, NY 13676-3213  | +1 212-202-2318 VOIP  | stupid, e.g. take drugs.




More information about the Thuban-devel mailing list

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