IMPORTKML
IMPORTKML brings KML or KMZ files, for example from Google Earth, into your drawing. Points, lines and areas from the file are drawn, spread over layers that follow the folders in the file.
Starting
Type IMPORTKML on the command line, or use the button in the ribbon on the SCAD Data / Export tab, GIS panel.
How it works
- An
Import KML/KMZwindow opens. Choose one or more.kmlor.kmzfiles. You can pick several at once. - For each file the command reports how it reads the coordinates:
KML coordinates detected as WGS84, converting to RD.The coordinates are GPS coordinates and are converted to RD.KML coordinates detected as drawing units, importing as-is.The coordinates are taken over unchanged (longitude as X, latitude as Y).
- The objects are drawn in model space. Then you get
Imported N entities from KML. - If a file fails, you see
Could not read: <file>orError importing <file>: .... The other files are still processed.
What gets drawn
| In the KML file | In the drawing |
|---|---|
| Point | A point. If the point has a name, a text with that name is added (text height 1). |
| LineString | A polyline |
| Polygon | A closed polyline for the outer boundary, plus a closed polyline for each hole |
| MultiGeometry | Each part separately, following the rules above |
If the file contains an altitude, a point gets that altitude as its Z value. Lines and the outer boundary of an area are drawn flat at the altitude of their first point.
Layers
- An object that sits in a folder gets that folder’s name as its layer. Folders inside folders are joined with a
/between them. - An object that is not in a folder uses its own name as the layer name.
- If it has no name either, it goes on the layer
KML-Import. - The characters
<,>,\,",:,;,?,*,|,=and the backtick are replaced by-in the layer name. - Layers that do not exist yet are created.