The research on programming to develop the extended functions of the specialized software 10 scale tools for different applications is essential. The open source software ArcView 3.2 allows users to program additional spatial analysis functions using the Avenue language. In this article, the programming on automatic spatial analysis is presented. It helps to develop zoning scheme for the easy degradable organic substances in Hai Phong coastal water, to provide a comprehensive picture of the city's coastal water environmental stalus, which reflects the potential risks of environmental pollution from the waste sources and the socia-economic activities.