ỨNG DỤNG GIS XÂY DỰNG HỆ THỐNG QUẢN LÝTHÔNG TIN MÔI TRƯỜNG CỦA CÁC KHU CÔNGNGHIỆP TRÊN ĐỊA BÀN TỈNH LONG AN

82 46 0
ỨNG DỤNG GIS XÂY DỰNG HỆ THỐNG QUẢN LÝTHÔNG TIN MÔI TRƯỜNG CỦA CÁC KHU CÔNGNGHIỆP TRÊN ĐỊA BÀN TỈNH LONG AN

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh BỘ GIÁO DỤC VÀ ĐÀO TẠO TRƯỜNG ĐẠI HỌC NÔNG LÂM TP HCM KHOA QUẢN LÝ ĐẤT ĐAI VÀ BẤT ĐỘNG SẢN BÁO CÁO TỐT NGHIỆP ĐỀ TÀI ỨNG DỤNG GIS XÂY DỰNG HỆ THỐNG QUẢN LÝ THÔNG TIN MÔI TRƯỜNG CỦA CÁC KHU CÔNG NGHIỆP TRÊN ĐỊA BÀN TỈNH LONG AN Sinh viên thực hiện: Bùi Thị Tuyết Oanh Mssv: 06151018 Lớp: DH06DC Ngành: Cơng Nghệ Địa Chính Tháng năm 2010 - Trang - Ngành: Công Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh BỘ GIÁO DỤC VÀ ĐÀO TẠO TRƯỜNG ĐẠI HỌC NƠNG LÂM TP.HỒ CHÍ MINH KHOA QUẢN LÝ ĐÁT ĐAI & BẤT ĐỘNG SẢN BÙI THỊ TUYẾT OANH “ ỨNG DỤNG GIS XÂY DỰNG HỆ THỐNG QUẢN LÝ THÔNG TIN MÔI TRƯỜNG CỦA CÁC KHU CÔNG NGHIỆP TRÊN ĐỊA BÀN TỈNH LONG AN” Giáo viên hướng dẫn: CN NGUYỄN THỊ HỒNG HẠNH Địa quan: Trường Đại Học Nơng Lâm Tp Hồ Chí Minh Ký tên:…… …………… - Tháng năm 2010 - Trang - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh LỜI CẢM ƠN -o0o Trong năm tháng học tập ghế giảng đường, em quý thầy cô tận tâm truyền đạt kiến thức, kinh nghiệm quý báu tạo cho em tảng vững đường nghiệp sau Em xin bày tỏ lòng biết ơn đến tất quý thầy cô Bộ môn Công Nghệ Địa Chính đào tạo, hướng dẫn cho em kiến thức lý thuyết thực hành, giúp em ứng dụng phát huy công tác, nghề nghiệp Em xin chân thành cảm ơn Nguyễn Thị Hồng Hạnh tận tình hướng dẫn, giúp đỡ, tạo điều kiện thuận lợi giúp cho em hoàn thành tốt đề tài tốt nghiệp Em xin gửi lời cảm ơn chân thành đến Anh, Chị Trung Tâm Thông Tin Tài Nguyên Môi Trường, STNMT tỉnh Long An cung cấp tài liệu, liệu cố vấn cho em vấn đề thực tế trình thực đề tài Mặc dù cố gắng kiến thức lực thân thời gian thực đề tài có hạn nên luận văn chắn nhiều sai xót, mong góp ý q thầy bạn TP Hồ Chí Minh, ngày tháng năm 2010 Sinh viên thực Bùi Thị Tuyết Oanh - Trang - Ngành: Công Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh TĨM TẮT LUẬN VĂN Sinh viên thực hiện: Bùi Thị Tuyết Oanh, Khoa Quản lý Đất đai & Bất động sản, Trường Đại Học Nơng Lâm TP Hồ Chí Minh Đề tài: ỨNG DỤNG GIS XÂY DỰNG HỆ THỐNG QUẢN LÝ THÔNG TIN MÔI TRƯỜNG CỦA CÁC KHU CÔNG NGHIỆP TRÊN ĐỊA BÀN TỈNH LONG AN Giáo viên hướng dẫn: CN Nguyễn Thị Hồng Hạnh Hiện nay, việc quản lý thông tin mơi trường Việt Nam nói chung tỉnh Long An nói riêng đặt nhiều thách thức Hệ thống thông tin địa lý công cụ hỗ trợ đắc lực, hiệu làm sở cho lãnh đạo địa phương hoạch định sách, định cách xác, nhanh chóng sở hệ thống liệu tự nhiên kinh tế - xã hội lưu trữ, cập nhật Trong lĩnh vực quản lý tài ngun mơi trường cơng cụ đắc lực cho phép phân tích, đánh giá đầy đủ trạng tiềm nguồn lực tài nguyên thiên nhiên (đất đai, khoáng sản, nguồn nước, mơi trường) để từ định hướng khai thác, quản lý hiệu quả, tiết kiệm nguồn lực ArcGIS phần mềm việc quản lý sở liệu không gian sở liệu thuộc tính Cho phép người nắm bắt thơng tin xác đất truy xuất liệu phục vụ cho công tác liên quan Nhằm đáp ứng yêu cầu công tác quản lý Nhà nước tài nguyên môi trường ngày đại thời gian tới đảm bảo định hướng phát triển khoa học công nghệ Bộ Tài nguyên Môi trường Ứng dụng GIS vào công tác quản lý thông tin môi trường giúp Long An quản lý hiệu địa bàn Từ yêu cầu thực tế nêu trên, đề tài “ỨNG DỤNG GIS XÂY DỰNG HỆ THỐNG QUẢN LÝ THÔNG TIN MÔI TRƯỜNG TRÊN ĐỊA BÀN TỈNH LONG AN” giải phần bất cập công tác quản lý thông tin môi trường Nội dung nghiên cứu gồm: - Nghiên cứu thực trạng ô nhiễm môi trường khu công nghiệp địa bàn tỉnh Long An - Thực trạng quản lý tài nguyên môi trường tỉnh Long An - Đánh giá nguồn tài liệu, số liệu đồ - Xây dựng sở liệu thông tin môi trường - Xây dựng công cụ hỗ trợ cho công tác quản lý thông tin môi trường - Đánh giá hiệu việc sử dụng hệ thống phần mềm ArcGIS-Công cụ hỗ trợ xây dựng quản lý thông tin môi trường Kết nghiên cứu: - Xây dựng mơ hình liệu khơng gian thuộc tính cho đối tượng: điểm ô nhiễm, ranh giới hành tương đối đầy đủ hợp lý - Tìm hiểu phần mềm ArcGIS Destop ngơn ngữ lập trình VBA - Xây dựng cơng cụ tiện ích quản lý thơng tin mơi trường - Trang - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh MỤC LỤC ĐẶT VẤN ĐỀ Phần I: TỔNG QUAN NGHIÊN CỨU 11 I.1 Cơ sở lý luận vấn đề nghiên cứu: 11 I.1.1 Cơ sở khoa học: .11 I.1.2 Cơ sở pháp lý: 14 I.1.3 Cơ sở thực tiễn: 14 I.2 Khái quát địa bàn tỉnh Long An: 14 I.3 Nội dung phương pháp nghiên cứu: 16 I.3.1 Nội dung nghiên cứu: 16 I.3.2 Phương pháp nghiên cứu: 17 I.3.3 Phương tiện nghiên cứu: 17 I.3.4 Quy trình thực đề tài: 24 Phần II: KẾT QUẢ NGHIÊN CỨU .25 II.1 Thực trạng ô nhiễm môi trường khu công nghiệp địa bàn tỉnh Long An 25 II.2 Thực trạng quản lý tài nguyên môi trường: 26 II.3 Đánh giá nguồn tài liệu, số liệu đồ: 28 II.3.1 Khảo sát trạng liệu: 28 II.3.2 Đánh giá nguồn liệu: 29 II.3.3 Đánh giá chất lượng liệu dùng xây dựng sở liệu: 30 II.4 Xây dựng sở liệu thông tin môi trường: 30 II.4.1 Phân lớp liệu: 30 II.4.2 Xây dựng liệu không gian: 30 II.4.3 Xây dựng liệu thuộc tính: 37 II.5 Xây dựng công cụ hỗ trợ cho công tác quản lý thông tin môi trường: 41 II.5.1 Tạo ToolBar thêm button vào ToolBar: 41 II.5.2 Chương trình quản lý thơng tin môi trường theo lớp ô nhiễm: 42 II.5.3 Chương trình quản lý thơng tin mơi trường theo lớp ranh giới hành chính: .48 II.5.4 Xây dựng công cụ thêm lớp liệu: .53 II.5.5 Xây dựng cơng cụ xóa lớp liệu: 54 II.5.6 Xây dựng công cụ thêm điểm ô nhiễm: 55 II.5.7 Xây dựng công cụ kết nối sở liệu: 56 II.6 Đánh giá hiệu việc sử dụng hệ thống phần mềm ArcGIS - Công cụ hỗ trợ xây dựng quản lý thông tin môi trường: 56 II.6.1 Hiệu mặt thời gian: 56 II.6.2 Hiệu mặt kỹ thuật: 57 II.6.3 Một số hạn chế: 57 KẾT LUẬN – KIẾN NGHỊ 58 TÀI LIỆU THAM KHẢO 60 PHỤ LỤC 60 - Trang - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh DANH SÁCH CÁC CHỮ VIẾT TẮT GIS: Hệ thống thông tin địa lý VBA: Visual Basic for Application HTXL: Hệ thống xử lý KCN: Khu công nghiệp BVTV: Bảo vệ thực vật BVMT: Bảo vệ môi trường TN&MT: Tài nguyên môi trường ĐTM: Đánh giá tác động môi trường K/CCN: Khu/cụm công nghiệp CS/DN: Cơ sở/doanh nghiệp KCN/CCN: Khu công nghiệp/cụm công nghiệp CSDL: Cơ sở liệu DBMS: Hệ quản trị sở liệu ĐBSCL: Đồng Sông Cửu Long GUI: Giao diện đồ họa người-máy - Trang - Ngành: Công Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh DANH SÁCH CÁC BẢNG BIỂU Bảng 1.1 Các kiểu liệu .14 Bảng 2.1 Mơ hình liệu khơng gian 28 Bảng 2.2 Mô hình liệu thuộc tính lớp nhiễm 29 Bảng 2.3 Mơ hình liệu thuộc tính lớp ranh giới hành 30 Bảng 3.1 Các control sử dụng giao diện thông tin môi trường 51 Bảng 3.2 Các control sử dụng giao diện tìm kiếm thông tin môi trường 52 Bảng 3.3 Các control sử dụng giao diện cập nhật thông tin môi trường 53 Bảng 3.4 Các control sử dụng giao diện thơng tin ranh giới hành 54 Bảng 3.5 Các control sử dụng giao diện tìm kiếm thơng tin ranh giới hành 55 Bảng 3.6 Các control sử dụng giao diện cập nhật thông tin ranh giới hành 56 Bảng 3.7 Các control sử dụng giao diện thêm điểm ô nhiễm 57 - Trang - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh DANH SÁCH CÁC HÌNH Hình 1.1: Các thành phần GIS Hình 1.2: Sơ đồ vị trí tỉnh Long An……………….…… Hình 1.3: Giao diện ArcMap 10 Hình 1.4: Giao diện ArcToolbox 12 Hình 1.5: Trình soạn thảo VBA 13 Hình 1.6: Các thuộc tính đặc trưng VBA 14 Hình 1.7: Hộp thoại Customize 15 Hình 1.8: Quy trình thực đề tài 15 Hình 2.1: Sơ đồ tổ chức quản lý mơi trường cho sở, doanh nghiệp KCN tỉnh Long An……………………… 17 Hình 2.2: Minh họa đồ trạng ô nhiễm môi trường khu vực tỉnh Long An…………………………… 20 Hình 2.3: Quy trình xử lý liệu tổng quát 21 Hình 2.4: Giao diện thể lớp nhiễm 22 Hình 2.5: Giao diện thể lớp giao thông 23 Hình 2.6: Personal Geodatabase Arccatalog tên o nhiem 24 Hình 2.7: Giao diện thể lớp thủy lợi 25 Hình 2.8: Giao diện thể lớp thủy lợi 2………… 26 Hình 2.9: Giao diện thể lớp thủy lợi 27 Hình 2.10: Giao diện thể lớp ranh giới hành 28 Hình 2.11: Mơ hình liệu không gian 28 Hình 2.12: Bảng liệu thuộc tính lớp ô nhiễm 29 Hình 2.13: Bảng liệu thuộc tính lớp ranh giới hành 30 Hình 2.14: Xây dựng bảng thuộc tính Arccatalog 31 Hình 2.15: Xây dựng trường thuộc tính ArcCatalog 31 Hình 2.16: Thêm trường thuộc tính Arcmap 32 Hình 2.17: Hộp thoại tạo ToolBar 32 Hình 2.18: Hộp thoại chọn kiện… 33 Hình 2.19: Hộp thoại hiển thị thơng tin mơi trường theo lớp nhiễm 34 Hình 2.20: Quy trình tìm kiếm thơng tin mơi trường 34 Hình 2.21: Cách truy cập vào giao diện tìm kiếm thơng tin mơi trường theo điểm nhiễm 35 Hình 2.22: Kết tìm kiếm điểm ô nhiễm thông qua mã công ty 36 Hình 2.23: Kết tìm kiếm thơng tin mơi trườngthơng qua tên cơng ty 37 Hình 2.24: Kết tìm kiếm thơng tin mơi trường thơng qua địa 37 Hình 2.25: Kết tìm kiếm thông tin môi trường thông qua ngành nghề 38 Hình 2.26: Quy trình cập nhật thơng tin mơi trường 38 Hình 2.27: Giao diện điểm ô nhiễm cập nhật thông tin 39 Hình 2.28: Hộp thoại thơng báo cập nhật thành cơng 39 Hình 2.29: Hộp thoại hiển thị thông tin môi trường theo lớp ranh giới hành chính……………………………………… 40 Hình 2.30: Quy trình tìm kiếm thơng tin mơi trường theo lớp ranh giới hành chính………………………………… 40 Hình 2.31: Giao diện tìm kiếm thơng tin mơi trường theo lớp ranh giới hành chính……………………………………………… 41 - Trang - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh Hình 2.32: Cách truy cập vào giao diện tìm kiếm thơng tin theo ranh giới hành chính…………………………………………… 41 Hình 2.33: Giao diện tìm kiếm thơng tin mơi trường theo ranh giới hành chính………………………………………………… 41 Hình 2.34: Tìm kiếm thơng tin mơi trường theo tên huyện qua lớp ranh giới hành chính………………………………………… 42 Hình 2.35: Kết tìm kiếm thơng tin mơi trường theo tên huyện qua lớp ranh giới hành chính…………………………… 43 Hình 2.36: Kết tìm kiếm thơng tin mơi trường theo khóa huyện qua lớp ranh giới hành chính………………………… 43 Hình 2.37: Quy trình cập nhật thơng tin mơi trường qua lớp ranh giới hành chính………………………… 44 Hình 2.38: Giao diện ranh giới hành cập nhật thơng tin 44 Hình 2.39: Hộp thoại thơng báo cập nhật thông tin môi trường thành công 45 Hình 2.40: Cách truy cập vào giao diện thêm lớp ô nhiễm 45 Hình 2.41: Giao diện lớp ô nhiễm thêm vào 45 Hình 2.42: Giao diện lớp nhiễm bị xóa 46 Hình 2.43: Giao diện điểm nhiễm thêm vào 46 Hình 2.44: Hộp thoại thông báo thêm thành công 47 Hình 2.45: Giao diện điểm nhiễm kết nối sở liệu 47 - Trang - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh ĐẶT VẤN ĐỀ Long An tỉnh thuộc khu vực đồng sông Cửu Long nằm sát với Tp Hồ Chí Minh, xem cầu nối miền Đông miền Tây Nam Bộ Trong năm gần đây, tình hình phát triển kinh tế - xã hội tỉnh Long An có chuyển biến tích cực, tốc độ tăng trưởng kinh tế tương đối cao đạt 9,7% giai đoạn năm 2001 – 2006 Tuy nhiên, bên cạnh phát triển kinh tế, đẩy mạnh đầu tư phát triển công nghiệp, thu hút đầu tư hạ tầng cụm công nghiệp, khu công nghiệp, tỉnh Long An phải đối đầu với vấn đề ô nhiễm môi trường ngày gia tăng gặp khơng khó khăn cơng tác quản lý bảo vệ mơi trường cho tỉnh nhà Vì việc quản lý thông tin môi trường vấn đề cấp bách Trong trình phát triển kinh tế nước ta nay, đời sống vật chất tinh thần người dân ngày nâng cao Sự đời phát triển công nghệ thông tin đem lại nhiều tiến bộ, việc ứng dụng công nghệ thông tin mà đặc biệt ứng dụng công nghệ GIS để quản lý thông tin môi trường khu công nghiệp cần thiết GIS hệ thống thông tin địa lý không với khả thu thập đo đạc địa lý, điều tra tài ngun thiên nhiên, lưu trữ, phân tích khơng gian, mơ hình hóa nhiều loại liệu, bao gồm liệu khơng gian liệu thuộc tính mà phục vụ cơng tác quản lý liệu, thành lập đồ,…với hỗ trợ phần mềm: mapinfo, arcview, arcgis… Vì việc quản lý thông tin môi trường cần thiết, tạo điều kiện thuận lợi cho công tác quản lý môi trường Xuất phát từ nhu cầu thực tiễn trên, đồng thời phân công khoa QLĐĐ&BĐS tiến hành nghiên cứu đề tài: “ỨNG DỤNG GIS XÂY DỰNG HỆ THỐNG QUẢN LÝ THÔNG TIN MÔI TRƯỜNG CỦA CÁC KHU CÔNG NGHIỆP TRÊN ĐỊA BÀN TỈNH LONG AN”  Mục tiêu nghiên cứu: Ứng dụng GIS xây dựng hệ thống thông tin môi trường nhằm phục vụ công tác quản lý toàn diện, thống nhất, chặt chẽ, lĩnh vực đất đai, đo đạc đồ, khoáng sản, nước, khí tượng, thủy văn quản lý mơi trường sở dùng chung sở liệu không gian đồ số  Đối tượng phạm vi nghiên cứu: - Đối tượng nghiên cứu: thông tin môi trường khu công nghiệp - Phạm vi nghiên cứu: địa bàn tỉnh Long An - Thời gian nghiên cứu: 1/3/2010-30/6/2010 - Trang 10 - Ngành: Công Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh MINH HỌA MỘT SỐ ĐOẠN CODE TRONG ARCOBJECT Đoạn code hiển thị thông tin: - Đoạn code cho Form thông tin môi trường: Dim frmFeature As IFeature Public Sub ShowInfo(pfeat As IFeature) On Err GoTo loi Set frmFeature = pfeat 'hien thi thong tin hop text box If Not IsNull(pfeat.Value(pfeat.Fields.FindField("KIHIEU"))) Then txtmacongty.Text = pfeat.Value(pfeat.Fields.FindField("KIHIEU")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("TENCONGTY"))) Then txttencongty.Text = pfeat.Value(pfeat.Fields.FindField("TENCONGTY")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("DIACHI"))) Then txtdiachi.Text = pfeat.Value(pfeat.Fields.FindField("DIACHI")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("NGANH"))) Then txtnganh.Text = pfeat.Value(pfeat.Fields.FindField("NGANH")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO1"))) Then txt1.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO1")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO2"))) Then txt2.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO2")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO3"))) Then txt3.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO3")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO4"))) Then txt4.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO4")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO5"))) Then txt5.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO5")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO6"))) Then txt6.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO6")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO7"))) Then - Trang 68 - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh txt7.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO7")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO8"))) Then txt8.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO8")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO9"))) Then txt9.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO9")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO10"))) Then txt10.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO10")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("KETLUAN"))) Then txtketluan.Text = pfeat.Value(pfeat.Fields.FindField("KETLUAN")) End If Set pfeat = Nothing 'tuong tu cho cac thuoc tinh khac Me.Show vbModeless Exit Sub loi: MsgBox "loi" & "Err.number & Err.Description" End Sub Private Sub cmdthoat_Click() End End Sub Private Sub Frame1_Click() End Sub Private Sub txtdiachi_Change() End Sub Private Sub UserForm_Click() End Sub - Đoạn code cho module1: Public g_pPoint As IPoint Public g_blsMouseDown As Boolean Public g_pFeedbackEnv As INewEnvelopeFeedback Public g_pMap As IMap Public g_pMxDoc As IMxDocument Public g_pActiveView As IActiveView Public gWordSpace As IWorkspace Public gFeatureWS As IFeatureWorkspace - Trang 69 - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh Public Function gmGetSelectionFeature(pFeatLayer As IFeatureLayer) As IFeature On Error GoTo Handle Dim sFeature As IFeature Dim pSelectionset As ISelectionSet Dim pFeatureselection As IFeatureSelection Dim pFeatureCursor As IFeatureCursor Set pFeatureselection = pFeatLayer Set pSelectionset = pFeatureselection.SelectionSet If (pSelectionset.Count 1) Then Set gmGetSelectionFeature = Nothing Else pSelectionset.Search Nothing, False, pFeatureCursor Set sFeature = pFeatureCursor.NextFeature If Not (sFeature Is Nothing) Then Set gmGetSelectionFeature = sFeature End If End If Set sFeature = Nothing Set pSelectionset = Nothing Set pFeatureCursor = Nothing Exit Function Handle: Set gmGetSelectionFeature = Nothing End Function - Đoạn code cho kiện MouseDown: Private Sub thongtinmoitruong_MouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long) Set g_pMxDoc = Application.Document Set g_pActiveView = g_pMxDoc.FocusMap Set g_pPoint = g_pActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(x, y) g_blsMouseDown = True Dim i As Integer Dim indexLayer As Integer Dim pFeature As IFeature Dim pEnumLayer As IEnumLayer Dim pFeatureLayer As IFeatureLayer Dim pUID As New UID - Trang 70 - Ngành: Công Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh Dim feat As IFeature pUID.Value = "{E156D7E5-22AF-11D3-9F99-00C04F6BC78E}" Set g_pMap = g_pMxDoc.FocusMap Set pEnumLayer = g_pMap.Layers(pUID, True) pEnumLayer.Reset Set pFeatureLayer = pEnumLayer.Next Do While Not pFeatureLayer Is Nothing Select Case pFeatureLayer.FeatureClass.AliasName Case "onhiem_dgn Point" Set pFeature = gmGetSelectionFeature(pFeatureLayer) If Not pFeature Is Nothing Then frmthongtinmoitruong.ShowInfo pFeature End If Case "Mau_dgn Polygon" Set pFeature = gmGetSelectionFeature(pFeatureLayer) If Not pFeature Is Nothing Then frmthongtinrghc.ShowInfo pFeature End If End Select Set pFeatureLayer = pEnumLayer.Next Loop End Sub Đoạn code tìm kiếm thơng tin: - Đoạn code cho Form tìm kiếm thơng tin mơi trường: Private Sub chkma_Click() End Sub Private Sub cmdthoat_Click() End End Sub Private Sub cmdtimkiem_Click() 'On Error Go to Loi Dim pFeatureLayer As IFeatureLayer Dim pFeatureselection As IFeatureSelection Dim whereClause As String Dim strSql As String Dim pFilter As IQueryFilter If chkma.Value = True Then If Trim(txtma.Text) "" Then strSql = "KIHIEU= '" & Trim(txtma.Text) & "'" - Trang 71 - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh If Trim(whereClause) "" Then whereClause = whereClause & "And" & strSql Else whereClause = strSql End If End If End If If chkten.Value = True Then If Trim(txtten.Text) "" Then strSql = "TENCONGTY= '" & Trim(txtten.Text) & "'" If Trim(whereClause) "" Then whereClause = whereClause & "And" & strSql Else whereClause = strSql End If End If End If If chkdiachi.Value = True Then If Trim(txtdiachi.Text) "" Then strSql = "DIACHI= '" & Trim(txtdiachi.Text) & "'" If Trim(whereClause) "" Then whereClause = whereClause & "And" & strSql Else whereClause = strSql End If End If End If If chknganh.Value = True Then If Trim(txtnganh.Text) "" Then strSql = "NGANH= '" & Trim(txtnganh.Text) & "'" If Trim(whereClause) "" Then whereClause = whereClause & "And" & strSql Else whereClause = strSql End If End If End If ' Tuong tu cho cac thuoc tinh khac If Trim(whereClause) = "" Then Exit Sub - Trang 72 - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh Dim i As Integer Dim pSelectionset As ISelectionSet Dim pFeatureCursor As IFeatureCursor Dim sFeature As IFeature Dim lv As ListItem Iswketqua.ListItems.Clear If (FoundLayer("onhiem_dgn Point", pFeatureLayer)) Then Set pTable = pFeatureLayer If (pFeatureLayer.Selectable) Then Set pFilter = New QueryFilter pFilter.SubFields = "*" pFilter.whereClause = whereClause Set pFeatureselection = pFeatureLayer pFeatureselection.SelectFeatures pFilter, esriSelectionResultNew, False Set pSelectionset = pFeatureselection.SelectionSet pSelectionset.Search Nothing, False, pFeatureCursor Set sFeature = pFeatureCursor.NextFeature Do While Not sFeature Is Nothing i=i+1 txtdem = i Set lv = Iswketqua.ListItems.Add(, , i) 'lv.Tag = sFeature.Value(sFeature.Fields.FindField("ObjectID")) If Not IsNull(sFeature.Value(sFeature.Fields.FindField("KIHIEU"))) Then lv.SubItems(1) = sFeature.Value(sFeature.Fields.FindField("KIHIEU")) End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("TENCONGTY"))) Then lv.SubItems(2) = sFeature.Value(sFeature.Fields.FindField("TENCONGTY")) End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("DIACHI"))) Then lv.SubItems(3) = sFeature.Value(sFeature.Fields.FindField("DIACHI")) End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("NGANH"))) Then lv.SubItems(4) = sFeature.Value(sFeature.Fields.FindField("NGANH")) End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("THONGSO1"))) Then lv.SubItems(5) = sFeature.Value(sFeature.Fields.FindField("THONGSO1")) End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("THONGSO2"))) Then lv.SubItems(6) = sFeature.Value(sFeature.Fields.FindField("THONGSO2")) - Trang 73 - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("THONGSO3"))) Then lv.SubItems(7) = sFeature.Value(sFeature.Fields.FindField("THONGSO3")) End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("THONGSO4"))) Then lv.SubItems(8) = sFeature.Value(sFeature.Fields.FindField("THONGSO4")) End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("THONGSO5"))) Then lv.SubItems(9) = sFeature.Value(sFeature.Fields.FindField("THONGSO5")) End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("THONGSO6"))) Then lv.SubItems(10) = sFeature.Value(sFeature.Fields.FindField("THONGSO6")) End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("THONGSO7"))) Then lv.SubItems(11) = sFeature.Value(sFeature.Fields.FindField("THONGSO7")) End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("THONGSO8"))) Then lv.SubItems(12) = sFeature.Value(sFeature.Fields.FindField("THONGSO8")) End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("THONGSO9"))) Then lv.SubItems(13) = sFeature.Value(sFeature.Fields.FindField("THONGSO9")) End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("THONGSO10"))) Then lv.SubItems(14) = sFeature.Value(sFeature.Fields.FindField("THONGSO10")) End If If Not IsNull(sFeature.Value(sFeature.Fields.FindField("KETLUAN"))) Then lv.SubItems(15) = sFeature.Value(sFeature.Fields.FindField("KETLUAN")) End If Set sFeature = pFeatureCursor.NextFeature Loop End If End If ' Zoom toi doi tuong vua tim ZoomToFeatureUseUID Exit Sub loi: MsgBox "Loi" & Err.Number & Err.Description End Sub Public Sub ZoomToFeatureUseUID() - Trang 74 - Ngành: Công Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh On Error GoTo Handle: Dim sSelecTool As ICommandItem Dim sCommandBars As ICommandBars Dim u As New UID u = "{AB073B49-DE5E-11D1-AA80-00C04FA37860}" Set sCommandBars = Application.Document.CommandBars Set sSelecTool = sCommandBars.Find(u) sSelecTool.Execute Exit Sub Handle: End Sub Private Sub Iswketqua_BeforeLabelEdit(Cancel As Integer) End Sub Private Sub UserForm_Initialize() Init End Sub Private Sub Init() Iswketqua.ListItems.Clear Iswketqua.ColumnHeaders.Clear Iswketqua.ColumnHeaders.Add , , "STT" Iswketqua.ColumnHeaders.Add , , "KI HIEU" Iswketqua.ColumnHeaders.Add , , "TEN CONG TY" Iswketqua.ColumnHeaders.Add , , "DIA CHI" Iswketqua.ColumnHeaders.Add , , "NGANH NGHE" Iswketqua.ColumnHeaders.Add , , "THONG SO 1" Iswketqua.ColumnHeaders.Add , , "THONG SO 2" Iswketqua.ColumnHeaders.Add , , "THONG SO 3" Iswketqua.ColumnHeaders.Add , , "THONG SO 4" Iswketqua.ColumnHeaders.Add , , "THONG SO 5" Iswketqua.ColumnHeaders.Add , , "THONG SO 6" Iswketqua.ColumnHeaders.Add , , "THONG SO 7" Iswketqua.ColumnHeaders.Add , , "THONG SO 8" Iswketqua.ColumnHeaders.Add , , "THONG SO 9" Iswketqua.ColumnHeaders.Add , , "THONG SO 10" Iswketqua.ColumnHeaders.Add , , "KET LUAN" Iswketqua.GridLines = True Iswketqua.FullRowSelect = True Iswketqua.View = lvwReport Iswketqua.HideColumnHeaders = False - Trang 75 - Ngành: Công Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh End Sub Public Sub ShowInfo() Init Me.Show vbModeless End Sub - Đoạn code cho Module1: Public Function FoundLayer(name As String, pFeatureLayer As IFeatureLayer) As Boolean Dim i As Integer Dim pFeatureClass As IFeatureClass Set g_pMxDoc = Application.Document Set g_pMap = g_pMxDoc.FocusMap For i = To (g_pMap.LayerCount - 1) If (UCase(g_pMap.Layer(i).name) = UCase(name)) Then Set pFeatureLayer = g_pMap.Layer(i) FoundLayer = True Exit Function End If Next i FoundLayer = False End Function - Đoạn code cho kiện Click: Private Sub timkiemthongtinmoitruong_Click() frmtimkiemthongtinmoitruong.Show vbModeless End Sub Đoạn code cập nhật thông tin: - Đoạn code cho Form cập nhật thông tin môi trường: If Trim(txt2.Text) " " Then'khai bao bien Dim frmFeature As IFeature 'thu tuc cap nhat thong tin cho doi tuong Private Sub cmdcapnhat_Click() On Error GoTo loi: If Trim(txtma.Text) " " Then frmFeature.Value(frmFeature.Fields.FindField("KIHIEU")) = Trim(txtma.Text) End If If Trim(txtten.Text) " " Then frmFeature.Value(frmFeature.Fields.FindField("TENCONGTY")) = Trim(txtten.Text) End If If Trim(txtdiachi.Text) " " Then - Trang 76 - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh frmFeature.Value(frmFeature.Fields.FindField("DIACHI")) = Trim(txtdiachi.Text) End If If Trim(txtnganh.Text) " " Then frmFeature.Value(frmFeature.Fields.FindField("NGANH")) = Trim(txtnganh.Text) End If If Trim(txt1.Text) " " Then frmFeature.Value(frmFeature.Fields.FindField("THONGSO1")) = Trim(txt1.Text) End If frmFeature.Value(frmFeature.Fields.FindField("THONGSO2")) = Trim(txt2.Text) End If If Trim(txt3.Text) " " Then frmFeature.Value(frmFeature.Fields.FindField("THONGSO3")) = Trim(txt3.Text) End If If Trim(txt4.Text) " " Then frmFeature.Value(frmFeature.Fields.FindField("THONGSO4")) = Trim(txt4.Text) End If If Trim(txt5.Text) " " Then frmFeature.Value(frmFeature.Fields.FindField("THONGSO5")) = Trim(txt5.Text) End If If Trim(txt6.Text) " " Then frmFeature.Value(frmFeature.Fields.FindField("THONGSO6")) = Trim(txt6.Text) End If If Trim(txt7.Text) " " Then frmFeature.Value(frmFeature.Fields.FindField("THONGSO7")) = Trim(txt7.Text) End If If Trim(txt8.Text) " " Then frmFeature.Value(frmFeature.Fields.FindField("THONGSO8")) = Trim(txt8.Text) End If If Trim(txt9.Text) " " Then frmFeature.Value(frmFeature.Fields.FindField("THONGSO9")) = Trim(txt9.Text) End If If Trim(txt10.Text) " " Then frmFeature.Value(frmFeature.Fields.FindField("THONGSO10")) = Trim(txt10.Text) End If If Trim(txtketluan.Text) " " Then frmFeature.Value(frmFeature.Fields.FindField("KETLUAN")) = Trim(txtketluan.Text) End If frmFeature.Store - Trang 77 - Ngành: Công Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh Set frmFeature = Nothing MsgBox "cap nhat cong", vbInformation, "Thong bao" Me.MousePointer = fmMousePointerDefault Exit Sub loi: MsgBox "loi" & Err.Number & Err.Description End Sub Public Sub ShowInfo(pfeat As IFeature) On Err GoTo loi: Set frmFeature = pfeat 'hien thi thong tin hop text box If Not IsNull(pfeat.Value(pfeat.Fields.FindField("KIHIEU"))) Then txtma.Text = pfeat.Value(pfeat.Fields.FindField("KIHIEU")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("TENCONGTY"))) Then txtten.Text = pfeat.Value(pfeat.Fields.FindField("TENCONGTY")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("DIACHI"))) Then txtdiachi.Text = pfeat.Value(pfeat.Fields.FindField("DIACHI")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("NGANH"))) Then txtnganh.Text = pfeat.Value(pfeat.Fields.FindField("NGANH")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO1"))) Then txt1.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO1")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO2"))) Then txt2.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO2")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO3"))) Then txt3.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO3")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO4"))) Then txt4.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO4")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO5"))) Then txt5.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO5")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO6"))) Then - Trang 78 - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh txt6.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO6")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO7"))) Then txt7.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO7")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO8"))) Then txt8.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO8")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO9"))) Then txt9.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO9")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("THONGSO10"))) Then txt10.Text = pfeat.Value(pfeat.Fields.FindField("THONGSO10")) End If If Not IsNull(pfeat.Value(pfeat.Fields.FindField("KETLUAN"))) Then txtketluan.Text = pfeat.Value(pfeat.Fields.FindField("KETLUAN")) End If Set pfeat = Nothing 'tuong tu cho cac thuoc tinh khac Me.Show vbModeless Exit Sub loi: MsgBox "loi" & Err.Number & Err.Description End Sub Private Sub cmdthoat_Click() End End Sub Private Sub txtketluan_Change() End Sub Private Sub UserForm_Click() End Sub - Đoạn code cho Module1: Public g_pPoint As IPoint Public g_blsMouseDown As Boolean Public g_pFeedbackEnv As INewEnvelopeFeedback Public g_pMap As IMap Public g_pMxDoc As IMxDocument Public g_pActiveView As IActiveView Public gWordSpace As IWorkspace - Trang 79 - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh Public gFeatureWS As IfeatureWorkspace Public Function gmGetSelectionFeature(pFeatLayer As IFeatureLayer) As IFeature On Error GoTo Handle Dim sFeature As IFeature Dim pSelectionset As ISelectionSet Dim pFeatureselection As IFeatureSelection Dim pFeatureCursor As IFeatureCursor Set pFeatureselection = pFeatLayer Set pSelectionset = pFeatureselection.SelectionSet If (pSelectionset.Count 1) Then Set gmGetSelectionFeature = Nothing Else pSelectionset.Search Nothing, False, pFeatureCursor Set sFeature = pFeatureCursor.NextFeature If Not (sFeature Is Nothing) Then Set gmGetSelectionFeature = sFeature End If End If Set sFeature = Nothing Set pSelectionset = Nothing Set pFeatureCursor = Nothing Exit Function Handle: Set gmGetSelectionFeature = Nothing End Function - Đoạn code cho kiện MouseDown: Private Sub capnhatthongtinmoitruong_MouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long) Set g_pMxDoc = Application.Document Set g_pActiveView = g_pMxDoc.FocusMap Set g_pPoint = g_pActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(x, y) g_blsMouseDown = True Dim i As Integer Dim indexLayer As Integer Dim pFeature As IFeature Dim pEnumLayer As IEnumLayer Dim pFeatureLayer As IFeatureLayer Dim pUID As New UID - Trang 80 - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh Dim feat As IFeature pUID.Value = "{E156D7E5-22AF-11D3-9F99-00C04F6BC78E}" Set g_pMap = g_pMxDoc.FocusMap Set pEnumLayer = g_pMap.Layers(pUID, True) pEnumLayer.Reset Set pFeatureLayer = pEnumLayer.Next Do While Not pFeatureLayer Is Nothing Select Case pFeatureLayer.FeatureClass.AliasName Case "onhiem_dgn Point" Set pFeature = gmGetSelectionFeature(pFeatureLayer) If Not pFeature Is Nothing Then frmcapnhatthongtinmoitruong.ShowInfo pFeature End If Case "Mau_dgn Polygon" Set pFeature = gmGetSelectionFeature(pFeatureLayer) If Not pFeature Is Nothing Then frmcapnhatrghc.ShowInfo pFeature End If End Select Set pFeatureLayer = pEnumLayer.Next Loop End Sub End Sub - Trang 81 - Ngành: Cơng Nghệ Địa Chính SVTH: Bùi Thị Tuyết Oanh - Trang 82 - ... nhiễm chưa thực cách chặt chẽ, thi u nhân lực trang thi t bị giám sát Các quan quản lý môi trường địa phương nơi có K/CCN khơng có đủ phương tiện trang thi t bị cần thi t để thực việc giám sát tất... gia kỹ thuật, người thi t kế trì hệ thống, người dùng GIS để giải vấn đề công việc  Phương pháp/cấu trúc: Một hệ GIS thành cơng theo khía cạnh thi t kế luật thương mại mô thực thi cho tổ chức -... thuật hợp thành GIS, GPS,…Phần cứng di động thi t bị nhẹ loại máy tính cá nhân lớn Thi t bị liên lạc khơng dây cho truy cập Internet GIS A.2 Giới thi u ArcGIS Desktop: Sản phẩm ArcGIS Desktop

Ngày đăng: 16/03/2019, 11:06

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan