source: TI03-DataExtractor/branches/titania_install/pygss/FeatureTypes.py @ 1520

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/branches/titania_install/pygss/FeatureTypes.py@1610
Revision 1520, 1.3 KB checked in by astephen, 14 years ago (diff)

This is the live version on titania - changes have been made so safest to SVN it.

Line 
1#   Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ).
2#   This software may be distributed under the terms of the
3#   Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt
4
5"""
6FeatureTypes.py
7===============
8
9FeatureTypes class holds relation between feature types and
10plotting operations.
11
12"""
13
14# Import required modules
15
16
17# import package modules including global variables
18from serverConfig import *
19from common import *
20
21class FeatureTypes:
22    """
23    FeatureTypes class holds relation between feature types and
24    plotting operations.
25    """
26   
27    plottingOperations={"PointFeature":"DisplayValueAndMetadata",
28                        "ProfileFeature":"YvsXGraph",
29                        "2DGridFeature":["Boxfill", "BoxfillContinents",
30                                         "Isofill", "IsofillContinents",
31                                         "Isoline", "IsolineContinents",
32                                         "IsolineFill", "IsolineFillContinents",
33                                         "PolarNorth", "PolarSouth"],
34                        "3DGridFeature":"As 2D but series",
35                        "4DGridFeature":"As 2D but series"}
36   
37    def __init__(self, featureType):
38        """
39        Takes feature type and sets up instance.
40        """
41        self.ft=featureType
42       
43
44    def getOperations(self):
45        """
46        Returns the session ID.
47        """
48        return FeatureTypes.plottingOperations[self.ft]
Note: See TracBrowser for help on using the repository browser.