[GRASS-SVN] r46710 - grass-addons/grass7/raster/r.modis/libmodis

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jun 15 04:15:22 EDT 2011


Author: lucadelu
Date: 2011-06-15 01:15:22 -0700 (Wed, 15 Jun 2011)
New Revision: 46710

Modified:
   grass-addons/grass7/raster/r.modis/libmodis/rmodislib.py
Log:
add class for projection and datum

Modified: grass-addons/grass7/raster/r.modis/libmodis/rmodislib.py
===================================================================
--- grass-addons/grass7/raster/r.modis/libmodis/rmodislib.py	2011-06-15 07:28:07 UTC (rev 46709)
+++ grass-addons/grass7/raster/r.modis/libmodis/rmodislib.py	2011-06-15 08:15:22 UTC (rev 46710)
@@ -51,3 +51,21 @@
 class projection:
     """Definition of projection for convert from sinusoidal projection to
     another one. Not all projection systems are supported"""
+    def __init__(self,value):
+        self.proj = value
+        self.projections = {'latlong':'GEO', 'lcc':'LAMBERT CONFORMAL CONIC',
+             'merc':'MERCARTOR', 'polar':'POLARSTEREOGRAFIC', 'utm':'UTM', 
+             'tmerc':'TRANSFERT MERCARTOR'}
+
+    def returned(self):
+        return self.projections[self.proj]
+
+class datum:
+    """Definition of datum for convert from sinusoidal projection. Not all 
+    datumare supported"""
+    def __init__(self,value):
+        self.datum = value
+        self.datumlist = {'AGGIUNGERE'}
+
+    def returned(self):
+        return self.datumlist[self.datum]



More information about the grass-commit mailing list