Difference between revisions of "Spatial Manager™ for AutoCAD - FAQs: Export ("Professional" edition only)"

From Spatial Manager Wiki
Jump to navigation Jump to search
Line 93: Line 93:
[[Image:SPMSetCrs2.png|border|'SPMSETCRS' command in the "Spatial Manager™ for AutoCAD ribbon]]
[[Image:SPMSetCrs25.png|border|'SPMSETCRS' command in the "Spatial Manager™ for AutoCAD ribbon]]

Revision as of 19:44, 4 November 2016


  • Objective of this section
    • To learn how to define export processes and their parameters and manage coordinate transformations
  • Topics in this section
    • Targets: data sources
    • Export parameters: AutoCAD objects selection, objects report, treat closed Polylines as Polygons
    • One-click export to Google Earth ("Standard" and "Professional" editions)
    • Transforming the coordinates: source and target, last used coordinate systems, searching in the coordinate systems catalog and transformation parameters

How can I Export AutoCAD objects as spatial features?

You can export AutoCAD objects as spatial features into files or databases by executing the 'SPMEXPORT' command of Spatial Manager™ for AutoCAD, which you will find in the "Spatial Manager" AutoCAD ribbon. This will launch the "Export" wizard of the application, which shares some of the steps with the Import wizard. The command not only exports the selected objects but saves their Extended Entity Data (EED/XDATA) as data tables (see below)

'SPMEXPORT' command in the Spatial Manager™ for AutoCAD ribbon

While running the "Export" wizard, you can select the export parameters that match your needs:

Export Parameters window

  • Export selection:
    • Select all objects: all objects in the drawing (layers "On" and "Thaw") will be exported
    • Only selected objects: only a selection of objects will be exported. You can select the objects before executing the Export function or by using the Selecting button in this window
    • Select objects in a layer: only the objects included in an AutoCAD Layer will be exported. You can select this layer using the drop-down list in this window
  • Other
    • Treat closed polylines as polygons: when checked, all closed Polylines in the drawing will be exported to the target as Polygon features. Most of the time the closed polylines represent polygonal elements in the target data format and this conversion can be automatic
    • Export objects Extended Entity Data (EED): when checked, the exported data Table will include the objects data (EED/XDATA)
    • Export objects "Handle" (unique key): when checked, the exported data Table will include a new Field whose value will be the "AutoCAD Handle" which is unique for every object in a drawing
    • Export objects Layer: when checked, the exported data Table will include a new Field whose value will be the Layer of the exported objects
    • Export objects Elevation: when checked, the exported data Table will include a new Field whose value will be the Elevation of the exported objects
      • Note: regardless this option, the application will use the object Elevation as Z-coordinate when exporting any XY-only object (Circles, Polylines, etc.)
    • Export Block properties (Name and Attributes): when checked, the exported data Table will include new Fields whose value will be the name and the Attributes of the exported Block References (if any)
      • Also export the Block Rotation (radians) and/or the Block Scales (X,Y,Z)
    • Export Texts: when checked any of the following, the data Table will include new Fields for data of the Text objects (if any)
      • Contents
      • Rotation
      • Height
    • Also export fields with null values
      • If not checked (default value): when you export to a target table with uniform fields structure(such as Shapefiles SHP), the table will include any field which have a non-null value in at least one object of the export selection. When you export to a target table with non-uniform fields structure (such as KML), each object will only include the fields which have a non-null value for the object itself
      • If checked: in all cases, each object and thus the entire table, will include all the fields (null or non-null)
  • Objects report: the application shows here the total number of the objects which will be exported and any warnings prior to the export process, such as the total number of unsupported objects which will not be exported or others

How can I configure the spatial Target when exporting from AutoCAD?

When you export using Spatial Manager™ for AutoCAD you must to select the exporting destination. If needed, you also must to select the data provider and its parameters

Export destination

First, you select the destination for the exported data: a file or a table inside a file or a database (or inside a schema of a file or a database)

Export target file

Next, you select a file type (the data provider). This step is not required if you have selected a destination which defines its own data provider (such as a SQLite table or a PostGIS table)

Data provider connection parameters

Then, you configure the export data provider connection parameters, if needed (Image: sample of the KML/KMZ files data provider)

How can I define a Transformation of coordinates when exporting?

When you are Exporting AutoCAD objects as spatial Features using Spatial Manager™ for AutoCAD, you will see that you can choose a Transformation of coordinates from the source to the target, in the "Export" wizard. This means that the application will calculate a geometric transformation between the source and the target data, which will depend on the chosen CRS for the source (drawing) and for the target (outgoing Features) data. You can choose the appropriate CRSs by clicking on "CRS catalog...", in the CRS dropdown list for the source or for the target data. In the CRS Catalog you can:

  • Filter the CRSs by type (Geocentric, Projected, etc.)
  • Choose a CRS by clicking on its row in the Catalog
  • Search CRSs by typing the search criteria in the "Search" box. You can type as many words as you like here,separated by blanks. The application will find all the rows which include all these words in any column of the Catalog

After choosing a pair of valid CRS for a Transformation, you can choose the geographic Area to apply it to (the application will choose by default the most common Area for this Transformation)

If the application "knows", "guesses" or "can assume" the CRS of the source and/or the target data, they will be chosen by default. You will be able to modify this choice, except in cases where only one CRS is valid; for example, for a KML or a KMZ file the only valid choice is the CRS WGS84 (SRID 4326), because these types of file are always defined using this CRS

You can assign a CRS to the drawing, or modify it, using the command 'SPMSETCRS'. By executing this command you will access the CRS Catalog of the application, described in the previous lines. In this case the Type "Projected" will be selected by default because is the most common choice

  • When exporting:
    • Those objects without assigned CRS will adopt the CRS of the drawing in the Transformation of coordinates
    • If all the objects to export have the same assigned CRS and the drawing has not an assigned CRS, the Transformation of coordinates will take the CRS of the objects as the source CRS by default

  • Notes:
    • As you will see, the CRS dropdown lists will include more and more CRSs as they have been previously chosen in other Transformation operations, so that you can choose your "last-used" CRSs directly from the dropdown list without having to access the CRS Catalog all the time. In addition, the CRS Catalog window shown when you execute 'SPMSETCRS' to assign a CRS to the drawing, or modify it, also includes a list of the "last-used" CRSs (if any) in the upper zone
    • Coordinate Systems objects available in the current version

Access to the CRS Catalog of the application

CRS Catalog of the application

'SPMSETCRS' command in the "Spatial Manager™ for AutoCAD ribbon

Last used CRSs in the Catalog window

Can I quickly Export the current status of the drawing to Google Earth ("Standard" and "Professional" editions)

Yes, you can. Regardless the advanced Export capabilities of Spatial Manager™ for AutoCAD which can be found in the "Professional" edition, the "Standard" and "Professional" editions of the application include a specific function designed to Export all or part of the objects in the visible Layers of the drawing and their data to a KML or KMZ file (Google Earth) through one-click operation. This exportation process considers the current Layers organization and the properties of the Layers and objects

  • The objects in the KML/KMZ file will assume the colors, weights, etc. of the objects in the drawing. A subdivision based on the type(s) of the objects in the Layers will be also created for each Layer, allowing you a high level of visibility control in Google Earth
  • The values for the NAME and DESCRIPTION of the elements in the KML/KMZ file will be automatically taken from the data fields "Name" and "Description" if those exist

Export to Google Earth (KML/KMZ) command

The Exported (KML or KMZ) file can be now open in Google Earth. As an extra, if Google Earth is installed in the computer where the Export process was performed you can even open it using a button of the Export report window. Anyway, upon completion of the Export process you can directly open the file location

Open file in Google Earth (if installed) or open file location

The file in Google Earth

You can export all the drawing, a selection of objects or all the objects in a Layer

Export to Google Earth (KML/KMZ) selection window

The application needs to know the Coordinate System (CRS) of the drawing for Exporting since in most cases will be necessary to perform an automatic coordinate transformation to the CRS used in Google Earth. You will see a Warning window if the process cannot be carried out and you may need assign a CRS to the drawing

Assign a CRS to the Map button

You can read about CRSs, the CRS Catalog and the Transformation of coordinates in the previous article

Is there any limitation or modification in the original objects when exporting?

Yes, there are some limitations and there may also be automatic changes in the objects when they are exported using Spatial Manager™ for AutoCAD

  • Limitations:
    • Filtering of incompatible objects: there are a few object types not supported by the export processes (such as Texts, MTexts or complex 3D objects), which are automatically filtered. The filter result is displayed before exporting on the "Objects report" of the first exporting wizard window
  • Modifications
    • Some objects, such as Blocks or External References, are exported as Point Features (Insertion Points). In the case of the Blocks or XRef, you must Explode them before exporting if you want to export their internal objects. The "Objects report" in the first exporting wizard window also warns the user about the number of Blocks and XRef Insertions if any have been selected to export
    • Automatic complex geometric operations: the application will review and edit the selected objects in order to export geometries accommodated in the target format

Circle segmentation

Sample: segmentation of an AutoCAD Circle when exported to a Polygons Shapefile (SHP)

How are the Extended Entity Data (EED/XDATA) exported?

If the selected objects to be exported have attached data (XDATA / EEDs), this object data will also be exported as data tables linked to the outgoing Features, if the Target supports these data tables. The EED/XDATA can be attached when the objects are imported, by hand using the Data Structure Management tools or can be there by a combination of both cases

XDATA / EEDs to be exported

Related links