SMS: Foundations of Location Analysis