Esempio n. 1
0
    def object( cls, rt_name ) : 

        rt = getRangeType( rt_name )

        out = []

        out.append("Range-Type: %s" % rt.name ) 
        out.append("\tType:\t\t%s" % rt.getDataTypeAsString())
        out.append("\tNr. of Bands:\t%d" % len(rt.bands))
        out.append("\tBands:")

        for band in rt.bands :
            out.append( "\t\t%s"%(band.identifier) ) 

        return "\n".join( out ) 
Esempio n. 2
0
    def object( cls, rt_name ) : 

        # get rangetype as dictionary and dump the json 
        return json.dumps( getRangeType(rt_name), indent=4,
                        separators=(',',': '), sort_keys=True )