Spatial middleware serves as a glue for high-performance and distributed GIS services to harness the computational capabilities of cyberinfrastructure. This paper focuses on the development of an important component of spatial middleware - a distributed resource broker that matches computation tasks of GIS and spatial analysis to appropriate cyberinfrastructure resources to solve computationally intensive GIS and spatial analysis problems. This distributed resource broker is built on computational intensity estimations and a self-organized grouping (SOG) framework. Specifically, we use computational intensity information to enable cyberinfrastructure resource brokering for spatial middleware by exploiting spatial characteristics; and adapt the SOG framework to enhance resource brokering performance through the use of a space filling curve. A new overlay network is designed to inherit the good performance and distributed self-organizing nature of SOG while the use of computational intensity information enhances computational performance of resource brokering for GIS and spatial analysis applications.