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

SketchUp to GIS: place a SKP model on the mapTừ SketchUp sang GIS: đặt mô hình SKP lên bản đồ

Mô hình SketchUp không có hệ tọa độ. Để nó nằm đúng chỗ trên Google Earth hay QGIS, cần một điểm đặt. Đây là cách đặt, phiên bản được hỗ trợ và vì sao một số layer bị bỏ.

A SketchUp model has no coordinate system. To land in the right place on Google Earth or in QGIS it needs an anchor. Here is how to set it, which versions work and why some layers are left out.

Vị trí của mô hình đến từ đâu? Where does the model's location come from?

Khi bạn dùng Add Location trong SketchUp (menu File, mục Geo-location; tên menu có thể khác đôi chút giữa các phiên bản), SketchUp ghi vĩ độ, kinh độ của gốc tọa độ mô hình và nguồn vị trí (Google Earth) vào tệp .skp. Công cụ đọc chính các giá trị đó.

When you use Add Location in SketchUp (the File menu, Geo-location; the menu name can differ a little between versions), SketchUp stores the latitude and longitude of the model origin and the location source (Google Earth) in the .skp. The tool reads exactly those values.

Điểm đặt là gốc tọa độ của mô hình (điểm 0,0,0), không phải tâm công trình. Mô hình làm từ mẫu mặc định mang một vị trí mẫu không phải vị trí thật; công cụ nhận ra và bỏ qua nó.

The anchor is the model's origin (the point 0,0,0), not the building's centre. A model made from a default template carries a template location that is not a real one; the tool recognises it and ignores it.

Trường hợpCaseCông cụ làm gìWhat the tool doesBạn cầnYou provide
Mô hình có vị trí Add LocationThe model has an Add Location positionDùng vị trí đóUses that positionKhông cần nhập gìNothing
Mô hình không có vị trí thậtThe model has no real locationBáo lỗi cho đến khi bạn nhập vị tríReports an error until you give a positionVĩ độ và kinh độ của gốc mô hìnhThe latitude and longitude of the model origin
Bạn muốn đặt mô hình ở chỗ khácYou want to place the model somewhere elseDùng vị trí bạn nhập thay cho vị trí trong tệpUses your position instead of the one in the fileVĩ độ và kinh độ mớiA new latitude and longitude

Phiên bản SketchUp nào được hỗ trợ? Which SketchUp versions are supported?

Phiên bảnVersionTình trạngStatus
SketchUp 2021 và 2026SketchUp 2021 and 2026Hỗ trợ, đã kiểm chứng trên tệp thậtSupported, verified on real files
SketchUp 2022 đến 2025SketchUp 2022 to 2025Đọc cùng định dạng tệp nên được chấp nhận, nhưng chưa thử trên tệp thật; trang kết quả ghi "chưa kiểm chứng"Same file format, so accepted, but not tried on real files; the result page says "not verified"
SketchUp 2020 và cũ hơnSketchUp 2020 and olderBị từ chối: hãy lưu lại ở SketchUp 2021 trở lênRejected: re-save the model in SketchUp 2021 or newer

Tệp phải là .skp hợp lệ, tối đa 100 MB, tối đa 2.000.000 tam giác, 500.000 mặt và 1.000.000 đoạn cạnh rời, và đọc trong 120 giây. Mỗi lần chuyển một tệp.

The file must be a valid .skp of at most 100 MB, at most 2,000,000 triangles, 500,000 faces and 1,000,000 loose-edge segments, read within 120 seconds. One file per conversion.

Vì sao layer địa hình bị bỏ? Why are the terrain layers left out?

Add Location nhập địa hình và ảnh vệ tinh của Google Earth thành hai layer: Location Snapshot và Location Terrain. Đó là dữ liệu Google Earth, không phải mô hình của bạn. Công cụ luôn bỏ qua hai layer này (cả hình học lẫn ảnh) và ghi lại trong phần tóm tắt kết quả. Hình học bạn vẽ không bị ảnh hưởng.

Add Location imports Google Earth terrain and satellite imagery as two layers: Location Snapshot and Location Terrain. That is Google Earth data, not your model. The tool always leaves both layers out (geometry and imagery) and reports it in the result summary. The geometry you drew is not affected.

Layer đang ẩn và đối tượng đang ẩn cũng không được xuất: ẩn những gì bạn không muốn đưa ra trước khi tải lên.

Hidden layers and hidden objects are not exported either: hide what you do not want exported before uploading.

Đơn vị và hệ trục Units and axes

  • Đơn vị: SketchUp lưu mọi thứ bằng inch bên trong; kết quả luôn tính bằng mét. Đơn vị hiển thị trong Model Info không đổi kết quả.Units: SketchUp stores everything in inches internally; the output is always in metres. The display units in Model Info do not change the result.
  • Hệ trục: Z hướng lên. Khi góc bắc bằng 0, trục đỏ (X) hướng đông và trục xanh (Y) hướng bắc.Axes: Z points up. When the north angle is 0, the red axis (X) points east and the green axis (Y) points north.
  • Độ cao: Z tính bằng mét so với gốc mô hình. Trong KML, mô hình đứng trên mặt đất tại điểm đặt (relativeToGround); trong Shapefile, Z là mét so với gốc, không phải cao độ so với mực nước biển.Height: Z is in metres above the model origin. In KML the model stands on the ground at its anchor (relativeToGround); in a Shapefile, Z is metres above the origin, not elevation above sea level.
  • Component và nhóm được trải phẳng; texture, chữ, kích thước, mặt cắt, scene và style không được mang theo. Mỗi mặt giữ đường viền ngoài và các lỗ.Components and groups are flattened; textures, text, dimensions, section planes, scenes and styles are not carried. Each face keeps its outer boundary and its holes.

Góc bắc North angle

Nếu tệp lưu góc bắc, công cụ áp dụng nó: mô hình được xoay sao cho trục Y của mô hình chỉ hướng lệch khỏi bắc thật đúng bằng góc đó, đo theo chiều kim đồng hồ. Góc 0 nghĩa là trục Y chỉ đúng hướng bắc.

If the file stores a north angle the tool applies it: the model is rotated so that its Y axis points away from true north by exactly that angle, measured clockwise. An angle of 0 means the Y axis points due north.

Quy ước này khớp với mô hình thật duy nhất có góc khác 0 mà chúng tôi đã đối chiếu, nhưng chưa được xác nhận độc lập. Nếu mô hình trông bị xoay lệch, chọn "Bỏ qua góc bắc của tệp" hoặc nhập góc bắc bạn muốn.

This convention agrees with the only real model with a non-zero angle that we checked, but it is not independently confirmed. If the model looks rotated, choose "Ignore the file's north angle" or enter the north angle you want.

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
Báo thiếu vị trí địa lýA missing-location errorTệp chưa Add Location, hoặc chỉ mang vị trí mẫuThe file never had Add Location, or only carries the template positionNhập vĩ độ, kinh độ của gốc mô hình, hoặc Add Location trong SketchUp rồi lưu lạiEnter the latitude and longitude of the model origin, or run Add Location in SketchUp and save
Mô hình lệch vài chục đến vài trăm métThe model is off by tens to hundreds of metresGốc tọa độ của mô hình không nằm ở chỗ bạn nghĩThe model's origin is not where you think it isKiểm tra vị trí của gốc (0,0,0) trong SketchUp; nhập vĩ độ, kinh độ chính xác của điểm đóCheck where the origin (0,0,0) sits in SketchUp; enter the exact latitude and longitude of that point
Mô hình bị xoayThe model is rotatedGóc bắc trong tệp khác với hướng thật của công trìnhThe north angle in the file differs from the building's real orientationChọn "Bỏ qua góc bắc của tệp" hoặc nhập góc bắcChoose "Ignore the file's north angle" or enter the north angle
Mô hình chìm dưới đất hoặc lơ lửngThe model sinks into the ground or floatsZ tính từ gốc mô hình, không phải từ mặt đất thậtZ is measured from the model origin, not from the real groundĐặt gốc tọa độ ở cao độ mặt đất trong SketchUpPut the origin at ground level in SketchUp
Báo phiên bản chưa được hỗ trợA version-not-supported errorTệp lưu từ SketchUp 2020 trở xuốngThe file was saved by SketchUp 2020 or olderMở và lưu lại bằng SketchUp 2021 trở lênOpen it and save it again in SketchUp 2021 or newer
Báo mô hình quá lớn hoặc quá phức tạpA model-too-large or too-complex errorVượt 2.000.000 tam giác, 500.000 mặt, 1.000.000 đoạn cạnh rời hoặc 120 giây đọc tệpOver 2,000,000 triangles, 500,000 faces, 1,000,000 loose-edge segments or 120 seconds of reading the fileTách mô hình, xóa chi tiết không cần, ẩn phần không xuấtSplit the model, remove detail you do not need, hide what should not be exported

Chọn đầu ra Choosing the output

  • KML hoặc KMZ: xem và gửi mô hình trên Google Earth; mỗi layer là một thư mục.KML or KMZ: view and share the model on Google Earth; each layer is a Folder.
  • SHP (ZIP): đưa mặt và cạnh rời vào QGIS, ArcGIS, có Z và bảng thuộc tính (layer, material, obj).SHP (ZIP): load faces and loose edges into QGIS or ArcGIS, with Z and an attribute table (layer, material, obj).
  • GLB: xem 3D trong trình xem glTF, Blender, ứng dụng web; mét, Y-up; vị trí đặt nằm trong asset.extras.georef.GLB: view in 3D in glTF viewers, Blender or web apps; metres, Y-up; the placement is in asset.extras.georef.

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

  1. Lưu mô hình bằng SketchUp 2021 trở lên.Save the model in SketchUp 2021 or newer.
  2. Chạy Add Location, hoặc chuẩn bị vĩ độ, kinh độ của gốc mô hình.Run Add Location, or have the latitude and longitude of the model origin ready.
  3. Đặt gốc tọa độ ở cao độ mặt đất và ở điểm bạn muốn dùng làm điểm đặt.Put the origin at ground level and at the point you want as the anchor.
  4. Ẩn layer và đối tượng không muốn xuất.Hide layers and objects you do not want exported.
  5. Chọn đầu ra phù hợp: KML hoặc KMZ để xem, SHP cho GIS, GLB cho 3D.Pick the right output: KML or KMZ to view, SHP for GIS, GLB for 3D.
  6. Mở kết quả và so với hiện trạng; nếu lệch hướng, thử bỏ qua góc bắc của tệp.Open the result and compare it with the site; if the orientation is off, try ignoring the file's north angle.