Spatial Relational Algebra: an Extended Relational Algebra for Spatial Databases