It is becoming increasingly common to find geo-spatial information contained in KML or KMZ files, used by Google Earth, produced by private users or by the administrative authority, and importing such files in AutoCAD has become a necessity

Spatial Manager™ for AutoCAD, whose main function is to import Features from geo-spatial data sources as AutoCAD Objects, includes an interesting data provider to use with KML/KMZ files. This data provider can read complex KML/KMZ files (with a complex folder structure), and allows you to accurately select the information you are importing and distribute it over AutoCAD Layers according to the folder of the data source in the KML/KMZ file or following the criteria defined by the value of any data Field of the KML/KMZ table

In the first part of this example, we will import the entire content of a Google Earth KML file in AutoCAD, without distributing this information in different Layers nor transforming the Coordinate Reference System of the incoming data; files in KML/KMZ formats are always defined using the WGS 84 geographic system, whose standard identifier (EPSG) is 4326, and, as you can see in the drawing when the import process is finished, the cursor coordinates indicate values ​​of Latitude and Longitude

In this case, the point type Features are imported as AutoCAD Points, linear type Features as AutoCAD open Polylines and polygon type Features as AutoCAD closed Polylines, adding AutoCAD Hatches, using the SOLID pattern with a certain level of Transparency, for those polygons

In the second part, we will import individually two folders from the same KML file that was used in the first part, into an existing AutoCAD drawing, whose coordinate dimensions are established as the UTM30-ED50 projected system that, as you can see in the drawing, uses the meter as the unit length. The standard identifier (EPSG) for this system is 23030

The first folder holds point type Features belonging to a network and will be imported as  AutoCAD Block References using an existing Block Definition in the drawing. This Block Definition includes two attributes which can be related to any Field from the source table to take their values. As you can see in the example, if the name of a Field matches that of an Attribute, the application selects this relationship Field-Attribute as the default relationship. Furthermore, these Blocks References will be distributed into different new or existing Layers of the drawing depending on the values ​​of one of the Fields of the point type Features in the source

The second folder holds linear type Features corresponding to the previous network, and will be imported using AutoCAD open Polylines into the same Layer

Also, in both import processes carried out in this second part of the example, the Coordinates of the imported Objects are transformed from the original system of the KML file (WGS84) to that of the drawing (UTM30-ED50)

Please, watch the video: