Measuring Galaxy Environment In Large Scale Photometric Surveys