Exemplo n.º 1
0
    def read(self):
        """Read the history of map, users need to use this function to
        obtain all the information of map. ::

            >>> import grass.lib.gis as libgis
            >>> import ctypes
            >>> import grass.lib.raster as libraster
            >>> hist = libraster.History()

        ..
        """
        libraster.Rast_read_history(self.name, self.mapset, self.c_hist)
Exemplo n.º 2
0
    def read(self, name):
        """Rast_read_history. ::

            >>> import grass.lib.gis as libgis
            >>> libgis.G_gisinit('')
            >>> import ctypes
            >>> import grass.lib.raster as libraster
            >>> hist = libraster.History()
            >>> libraster.Rast_read_history(ctypes.c_char_p('aspect'),
            ...                             ctypes.c_char_p(''),
            ...                             ctypes.byref(hist))
            >>> libraster.Rast_get_history(ctypes.byref(hist),
            ...                            libraster.HIST_MAPID)
            'Tue Nov  7 01:11:23 2006'

        ..
        """
        libraster.Rast_read_history(ctypes.c_char_p(name), ctypes.c_char_p(''),
                                    ctypes.byref(self.hist))
Exemplo n.º 3
0
    def read(self):
        """Read the history of map, users need to use this function to
        obtain all the information of map. ::

            >>> import grass.lib.gis as libgis
            >>> libgis.G_gisinit('')
            >>> import ctypes
            >>> import grass.lib.raster as libraster
            >>> hist = libraster.History()
            >>> libraster.Rast_read_history(ctypes.c_char_p('elevation'),
            ...                             ctypes.c_char_p(''),
            ...                             ctypes.byref(hist))
            0
            >>> libraster.Rast_get_history(ctypes.byref(hist),
            ...                            libraster.HIST_MAPID)
            'Tue Nov  7 01:09:51 2006'

        ..
        """
        libraster.Rast_read_history(self.name, self.mapset, self.c_hist)