DWGtoKMZ › CAD → GIS › Hướng dẫn / Guide

CAD coordinate systems: fix a drawing in the wrong placeHệ tọa độ CAD: vì sao bản vẽ nằm sai vị trí và cách sửa

Bản vẽ chuyển xong nhưng nằm lệch hoặc nằm ở nơi khác? Gần như luôn là do chọn sai hệ tọa độ. Đây là cách nhận biết và sửa.

Converted the drawing but it is shifted or somewhere else entirely? It is almost always the wrong coordinate system. Here is how to tell and how to fix it.

Vì sao bản vẽ nằm sai chỗ? Why does the drawing land in the wrong place?

Tệp DWG, DXF chỉ lưu các con số X, Y. Để đặt chúng lên Google Earth hay QGIS, phần mềm phải biết các con số đó thuộc hệ tọa độ nào. Công cụ này không đọc hệ tọa độ từ bản vẽ: nó dùng đúng hệ bạn chọn trước khi chuyển đổi.

A DWG or DXF only stores X, Y numbers. To place them on Google Earth or in QGIS the software must know which coordinate system they belong to. This tool does not read a CRS from the drawing: it uses exactly the one you choose before converting.

Chọn đúng hệ thì bản vẽ trùng với thửa đất và đường thực tế. Chọn sai thì hình vẫn đẹp nhưng lệch, đôi khi vài trăm mét, đôi khi xa hơn nhiều.

With the right system the drawing matches real parcels and roads. With the wrong one the shape still looks fine but is shifted, sometimes by hundreds of metres, sometimes much further.

Nhìn con số để đoán hệ tọa độ Read the numbers to guess the system

Mở bản vẽ, chọn một điểm bất kỳ và đọc tọa độ. Đối chiếu với bảng sau.

Open the drawing, pick any point and read its coordinates. Compare with the table.

Tọa độ trông như thế nàoWhat the numbers look likeThường làUsuallyChọn trong công cụChoose in the tool
X khoảng 2.300.000 và Y khoảng 580.000 (hàng triệu và hàng trăm nghìn)One value around 2,300,000 and another around 580,000 (millions and hundreds of thousands)Tọa độ phẳng theo mét, thường là VN2000Projected metres, often VN2000VN2000 theo tỉnh, hoặc nhập kinh tuyến trụcVN2000 by province, or enter the central meridian
Hai số như 105.83 và 21.02Two numbers like 105.83 and 21.02Kinh độ, vĩ độLongitude and latitudeWGS84WGS84
Số nhỏ, quanh 0 hoặc vài nghìn, không khớp với nơi nàoSmall numbers near 0 or a few thousand that match nowhereTọa độ cục bộ của công trìnhA project's local coordinatesChưa đặt được lên bản đồ: cần đưa về tọa độ thật trong CAD trướcCannot be placed yet: move the drawing to real coordinates in CAD first
Tọa độ phẳng nhưng bản vẽ ghi UTM hoặc có mã EPSGProjected numbers and the drawing notes UTM or an EPSG codeHệ có mã EPSGA system with an EPSG codeEPSG tùy chỉnh, ví dụ 3405 (VN-2000 UTM múi 48)Custom EPSG, for example 3405 (VN-2000 UTM zone 48)

Hai lưu ý hay gặp. Thứ nhất, bảng tọa độ trắc địa ở Việt Nam thường ghi X là hướng Bắc và Y là hướng Đông, ngược với CAD và GIS; công cụ đọc trục X của bản vẽ là hướng Đông, trục Y là hướng Bắc. Thứ hai, với VN2000 công cụ coi tọa độ bản vẽ là mét và không tự đổi đơn vị: bản vẽ vẽ bằng mm hoặc cm cần được đổi về mét trong CAD trước.

Two common traps. First, Vietnamese survey tables usually list X as northing and Y as easting, the opposite of CAD and GIS; the tool reads the drawing's X axis as east and Y axis as north. Second, with VN2000 the tool treats drawing coordinates as metres and does not convert units: a drawing in mm or cm needs to be scaled to metres in CAD first.

Chọn hệ tọa độ trong công cụ Choosing the system in the tool

Lựa chọnOptionDùng khiUse whenBạn nhậpYou provide
VN2000 – theo tỉnh / by provinceBản vẽ VN2000 và bạn biết tỉnh/thành của dự ánA VN2000 drawing and you know the project's provinceChọn tỉnh/thành trong danh sáchPick the province from the list
VN2000 – kinh tuyến trục / meridianBản vẽ VN2000 nhưng không chắc tỉnh, hoặc hồ sơ ghi kinh tuyến trụcA VN2000 drawing where you are unsure of the province, or the file states the central meridianKinh tuyến trục dạng thập phân, ví dụ 105.75The central meridian in decimal degrees, for example 105.75
WGS84Tọa độ đã là kinh độ, vĩ độThe coordinates are already longitude and latitudeKhông cần nhập thêmNothing more
EPSGHệ khác có mã EPSG, ví dụ VN-2000 UTM (6°)Another system with an EPSG code, for example VN-2000 UTM (6°)Mã EPSG, ví dụ 3405 hoặc 3406The EPSG code, for example 3405 or 3406

Chi tiết cách chọn tỉnh và kinh tuyến trục VN2000 nằm trong hướng dẫn riêng.

The details of choosing a VN2000 province and central meridian are in their own guide.

Triệu chứng và cách xử lý Symptoms and fixes

Triệu chứngSymptomNguyên nhân thường gặpLikely causeCách xử lýFix
Hình đúng dạng nhưng lệch vài trăm mét đến vài kmRight shape but off by a few hundred metres to a few kmKinh tuyến trục hoặc tỉnh chưa đúng (kinh tuyến lân cận)Wrong central meridian or province (a neighbouring meridian)Xem kinh tuyến ghi trong khung tên hoặc thuyết minh; chọn theo kinh tuyến trụcCheck the meridian in the title block or report; choose by central meridian
Báo lỗi và không tạo ra tệpAn error and no fileToàn bộ hình rơi ngoài vùng hợp lệ của hệ đã chọnEverything falls outside the valid area of the chosen systemĐổi hệ tọa độ; kiểm tra bản vẽ có phải tọa độ cục bộ khôngChange the system; check whether the drawing uses local coordinates
Thiếu một phần bản vẽPart of the drawing is missingĐối tượng nằm ở tọa độ cục bộ hoặc gần gốc (0,0) bị coi là ngoài vùng và bị bỏ quaObjects at local coordinates or near (0,0) count as outside the area and are skippedXóa hoặc đưa các đối tượng đó về đúng tọa độ trong CAD rồi chuyển lạiDelete them or move them to real coordinates in CAD, then convert again
Hình trên Google Earth xa hẳn nơi dự ánThe drawing is far from the project siteNhầm hệ (ví dụ UTM thay vì VN2000) hoặc nhầm X và YWrong system (for example UTM instead of VN2000) or swapped X and YThử hệ khác hoặc hoán đổi X, Y trong CADTry another system, or swap X and Y in CAD
Không thấy chữ trong Google EarthNo text in Google EarthKML và KMZ không xuất chữKML and KMZ do not export textChọn Shapefile: chữ thành điểm có trường textChoose Shapefile: text becomes points with a text field
Vùng không được tô màuAreas are not filledPolyline đóng được xuất thành đường viền; chỉ hatch và solid được tôA closed polyline is exported as an outline; only hatches and solids are filledDùng hatch trong CAD, hoặc chọn Shapefile (polyline đóng thành vùng)Use a hatch in CAD, or choose Shapefile (closed polylines become polygons)

Checklist trước khi chuyển Checklist before you convert

  1. Đọc tọa độ một điểm trong bản vẽ và xác định: mét hay độ?Read one point's coordinates and decide: metres or degrees?
  2. Nếu là mét: biết hệ nào (VN2000, UTM) và kinh tuyến trục hoặc mã EPSG.If metres: know the system (VN2000, UTM) and the central meridian or EPSG code.
  3. Bản vẽ theo mét, không phải mm hoặc cm.The drawing is in metres, not mm or cm.
  4. Đối tượng không nằm lạc ở gốc (0,0) hay tọa độ cục bộ.No stray objects at the origin (0,0) or at local coordinates.
  5. Chọn đầu ra phù hợp: KML hoặc KMZ để xem, SHP để phân tích GIS.Pick the right output: KML or KMZ to view, SHP for GIS analysis.
  6. Mở kết quả trong Google Earth hoặc QGIS và so với đường, thửa quen thuộc.Open the result in Google Earth or QGIS and compare it with familiar roads and parcels.