source: cows/trunk/cows/service/imps/pywms/ @ 4808

Subversion URL:
Revision 4808, 1.4 KB checked in by domlowe, 11 years ago (diff)

adding contents of pywms

2View classes.
4@author: Stephen Pascoe
7class GridRenderer(object):
8    """A class which converts a Grid object into an image.
10    @ivar mimeType: The MIME type of images created by this renderer.
11    @ivar varmin: The minimum value on the grid for colourmap calculation.
12    @ivar varmax: The maximum value of the grid for colourmap calculation.
13    """
15    mimeType = NotImplemented
16    varmin = NotImplemented
17    varmax = NotImplemented
19    def renderGrid(self, grid, bbox, width, height):
20        """Draw the grid into an image.
22        @param grid: The grid to draw
23        @param bbox: The bounding box to map grid onto.  This may extend
24            beyond the grid's bounds.
25        @param width: The image width in pixels.
26        @param height: The image height in pixels.
27        @return: A PIL.Image object.
29        @note: grid is expected to cover the entire longitude range of bbox but may
30            not cover all of the latitude range if bbox extends beyond the CRS:84 range.
31            In this case the returned image must be padded to enforce the correct
32            image size and bbox.
33        """
34        raise NotImplementedError
36    def renderColourbar(self, width, height, isVertical=True):
37        """
38        @param width: The image width in pixels.
39        @param height: The image height in pixels.
40        @param isVertical: Boolean selecting orientation.
41        @return: A PIL.Image object
42        """
43        pass
Note: See TracBrowser for help on using the repository browser.