Selecting features by attributes and by location