Geographic location of nodes is very useful for a sensor network. A novel and practical Radio Frequency (RF)-based localization algorithm called Kcdlocation is presented for some specific network topologies, such as grid and linear topology. The Kcdlocation can be applied to those wireless sensor networks deployed with known coordinate database. This algorithm examines the ordered sequence of neighboring unknown nodes relative to anchor node, by ranking them on RSSI measurements between them and the anchor node, to determine the location of unknown nodes. Once the ranging technology can distinguish neighboring unknown nodes, it identifies the correct position for each sensor node. Its performances in the real circumstance have been verified through various experiments with several RF channels and node deployment parameters, where SKLTT sensor nodes developed by our lab are adopted. The node localization accuracy of Kcdlocation of a 5*4 grid network can reach 100% in a flat open square.