We calculate the luminosity function of galaxies of the Early Data Release of the Sloan Digital Sky Survey ( SDSS ) and the Las Campanas Redshift Survey ( LCRS ) . The luminosity function depends on redshift , density of the environment and is different for the Northern and Southern slice of SDSS . We use luminosity functions to derive the number and luminosity density fields of galaxies of the SDSS and LCRS surveys with a grid size of 1 h ^ { -1 } Mpc for flat cosmological models with \Omega _ { m } = 0.3 and \Omega _ { \Lambda } = 0.7. We investigate the properties of these density fields , their dependence on parameters of the luminosity function and selection effects . We find that the luminosity function depends on the distance and the density of the environment . The last dependence is strong : in high-density regions brightest galaxies are more luminous than in low-density regions by a factor up to 5 ( 1.7 magnitudes ) .