HONG Kong is poised to gain a small part of the mainland four years before the territory reverts to Chinese rule. An anti-flooding project to widen and deepen the Shenzhen River - which marks the border between Hong Kong and China - is expected to change the river's course and the position of the frontier in some areas. And more than 300 people living on the Chinese side of the border are hoping the project will be their ticket to a home in the territory. If the new border continues to follow the river line, several pieces of land now in Shenzhen will fall into the hands of Hong Kong. Governor Chris Patten promised to speed up the project in the wake of the extensive flooding caused by Typhoon Dot last month. No final decisions have been taken as yet, but a map showing the areas that may be affected has been circulated among legislators. However, there is already rejoicing among poor Chinese fishermen and pig farmers living in the two square kilometres of fishponds and squatter huts opposite the Lok Ma Chau border-post. ''I really hope this will bring me to Hong Kong and change my way of life,'' said villager Tong Guoqing, 18. ''It is a very hard life living here. We are very poor, earning only about $100 a month.'' Ling Huichao shares the same dream. ''There is no future here. We cannot afford our basic needs,'' he said. The area, which is 90 per cent fishponds, interspersed by muddy banks and dotted with bamboo shacks and other squatter homes, is the largest piece of land expected to change hands. Its residents hope they will be able to follow their homes across to the other side of the border, although it seems more likely they will be resettled on the mainland. Hong Kong is also expected to gain 0.1 square kilometres near Liu Pok village, and 0.1 sq km opposite Sandy Ridge Cemetery. In return, two small pieces of farmland, next to Lowu railway station and Man Kam To check-point, will move across to the Chinese side of the border. The realignment of the river, expected to begin in 1995, will change its shape, enable the water to flow faster, and reduce the risk of flooding that presently plagues the border residents. Planning, Environment and Lands spokesman Thomas Chan said talks on the boundary revision were underway. He said this would not affect work on the anti-flooding measures, as both sides had agreed to separate technical issues from border questions. He said less than 100 Hong Kong residents would be affected by any redrawing of the boundary.