Working with .dxf Vector Maps
  • 04 Jul 2024
  • 10 Minutes to read
  • Dark
    Light
  • PDF

Working with .dxf Vector Maps

  • Dark
    Light
  • PDF

Article summary

D vector maps can be imported as .dxf files to complement or replace the maps in NavVis IVION. Vector maps enable users to present an easy-to-read overview of the building that can be customized.

To successfully import and work with .dxf files refer to the following:

  • Only metric values are supported for a local coordinate system.

  • Imports of files up to 20 MB or less are supported.

  • Supported geometries include points, polylines, polygons, arcs, and hatches, other geometry types are not supported.

  • Tips on improving the overall performance, download times, and level of detail.

  • (ftUS) indicates US Survey Feet and (ft) indicates International Feet when selecting a Spatial Reference System.

  • The following table shows versions that are supported:

Version

Internal version

AutoCAD versions

DWG2013

AC1027

AutoCAD 2013, AutoCAD 2014, AutoCAD 2015, AutoCAD 2016, AutoCAD 2017

Uploading a .dxf Vector Map

  1. In NavVis IVION, go to the Site for which you want to upload a vector map.

  2. Go to Site Setup > Vector map.

    Vector_Map_Editor
  3. Click Add a DXF file.

    Add_a_dxf_file
  4. In the dialog that opens, specify the source coordinate system for the .dxf file:

    1. Select Site coordinate system to import the .dxf file into the coordinate system that was previously defined for the site. Place the cursor over the info icon for details on the site coordinate system.

      site_coordinate_system
    2. Select Spatial reference system to import the .dxf file into a projected, metric system. Start typing a name and select the desired spatial reference system from the options that appear.

      spatial_reference_system
    3. Select Dataset to import the .dxf file into the coordinate system of a specific dataset. Select a dataset from the drop-down menu.

      Dataset_Coordinate_System
  5. Click Upload DXF file and choose the file that you want to upload.

  6. Click Publish when you have finished.

Creating a Transformation

The Manage Transformations option offers users the ability to create a new transformation on the applicable coordinate reference system in NavVis IVION. Inputs for the Custom Coordinate Systems dialogue are based on an affine transformation matrix, describing a shift and a rotation relative to a parent coordinate system such as the site coordinate system or a spatial reference system.

Procedure

  1. Go to Site Setup > Vector Map.

    Vector_Map_Editor
  2. Click Manage transformations.

    Add_a_dxf_file
  3. Click Add.

    A screenshot of a computer  Description automatically generated
  4. In the dialog that opens, enter a name for the custom coordinate system.

  5. Select a spatial reference system by typing a name and selecting from the options that appear.

  6. Alternatively, you can specify a custom projection:

    1. Enter a name for the custom projection.

    2. Define the x, y, and z values of the base point.

    3. Optionally, define a rotation for the spatial reference system by entering the angle or the rotation of the x-axis ( rx) and y-axis ( ry)

  7. Click Save.

  8. Click Publish when you have finished.

    custom_coordinate_systems

UTM Projection

The Universal Transverse Mercator (UTM) projection is ideal to use for geo-referencing vector maps in a local area, since angles and direction are preserved. To minimize distance distortion, UTM splits the globe into sixty zones.

Munich, Germany is located in UTM zone 32 North. If you do not know which UTM zone describes your location, you can use this online tool to find the best fit.

Another piece of information that is necessary to provide with UTM projections is the ellipsoid. While the WGS84 ellipsoid is generally used globally, the European Terrestrial Reference System 1989 (ETRS89) is the preferred datum system for describing geographical data located in Europe. Therefore, our vector map located in Munich, Germany can be referenced to the EPSG 25832 - ETRS89 / UTM zone 32N coordinate reference system.

NavVis IVION Add-In for Revit

You can also use the NavVis IVION Add-In for Revit to geo-reference vector maps instead of doing it manually. The add-in connects a Revit project to an NavVis IVION Instance and can calculate the appropriate transformation based on tie points.

Other Software for Geo-Referencing

Currently, importing a .dxf vector map into NavVis IVION requires knowing which coordinate reference system best describes its real-world location. In other words, it is necessary to know:

  1. Source coordinate system for previously geo-referenced vector maps, e.g. EPSG 25832, ETRS89 / UTM zone 32N.

  2. Custom coordinate system, e.g. knowing the reference SRID as well as its affine transformation parameters.

Sometimes this information is difficult to find for individuals who are not familiar with geo-referencing or coordinate reference systems. One way to geo-reference your vector map without knowing its transformation parameters is to do so using external software. Some available software that can help with this task includes, but is not limited to:

Tutorial: Geo-Referencing .dwg using Open Source Software

Before performing this task you need the following:

  • QCAD: Note that when using the trial version, QCAD must be restarted every 30 minutes to ensure full feature functionality. Remember to save edits often.

  • QGIS: Plus an OpenStreetMap plugin, such as the QOSM Plugin.

  • The .dwg file: NavVis-2D Floor Plan.dwg.

A screenshot of a computer  Description automatically generated

Procedure

  1. After downloading the required material, open the .dwg file in QCAD.

  2. Edit the layers using the Layer List.

    A screenshot of a computer  Description automatically generated
    1. Remove all unnecessary layers, such as annotation and unused layers.

    2. To remove a layer, select it in the Layer List and select the red minus symbol at the top.

    3. Toggle the layer visibility to determine whether unused layers can be removed.

  3. Convert all the Block References to polylines so that they can be imported to NavVis IVION.

    1. Open the Property Editor window.

      A screenshot of a computer  Description automatically generated
    2. Check whether a selected layer contains Block References and, if so, explode them.

    3. Select a layer from the Layer List by right-clicking on it.

    4. The Property Editor is now populated with the selected layer's properties.

    5. In the Selection field, select Block Reference from the drop-down menu.

    6. Type explode in the command line to convert the blocks to polylines.

      Important: If you select the entire drawing and explode, all geometries will be exploded into simple lines. This will increase the file size and will slow down processes in NavVis IVION. Only explode non-supported items.

      A screenshot of a computer  Description automatically generated
    7. Once you are finished exploding Block References, Purge unused blocks. Type purgeblocks in the command line.

  4. Save edits.

  5. Open QGIS.

  6. Install QOSM Plugin so that OpenStreetMap Map Tiles can be imported into QGIS as a reference.

  7. Add OSM Tile Layer.

    A screenshot of a computer  Description automatically generated
  8. Drag Map to Location and zoom in on the location where the .dxf should be placed.

  9. Select a coordinate reference system such as EPSG 25832 - ETRS89 / UTM zone 32N

  10. Copy the coordinates from QGIS to QCAD.

    1. In QGIS, zoom to a point where the DXF should be placed.

    2. Copy the coordinates.

      A screenshot of a computer  Description automatically generated
  11. In QCAD, move objects to their real-world location using the coordinates from QGIS.

    1. Select all objects by typing selectall in the command line.

    2. Type move in the command line.

    3. The reference point should be the point on the vector map that corresponds to the coordinates copied from QGIS. In this tutorial, the coordinates copied from QGIS equate to the top left corner of the rotated vector map, or the bottom left corner before rotation.

    4. When it prompts for target point in the command line, paste the coordinates from QGIS and press Enter.

    5. Accept the default settings and press OK.

  12. In QGIS, measure the angle of the building on OpenStreetMap to determine the angle the vector map must be rotated.

    1. First, line up the building you are referencing on OpenStreetMap to a horizontal reference, such as the bottom map border.

    2. From the View menu, navigate to Measure and select Measure Angle.

    3. Trace the angle onto the map and double click when finished.

    4. Copy the angle value.

      A screenshot of a computer  Description automatically generated
  13. In QCAD, rotate the vector map by the angle copied from QGIS.

    1. Select all objects then type rotate in the command line.

    2. The center point can be the same point that was chosen as the reference point in Step 10.

    3. Accept the default settings and press OK.

    4. In this tutorial, the objects were first rotated -90 degrees to more accurately reflect the building's orientation on OpenStreetMap. They were then rotated by the angle obtained from QGIS, -18.777.

  14. Scale the vector map to its appropriate size.

    1. Normally, if the file is saved in metric units such as meters, modifying the scale might not be necessary.

    2. One way to determine if the scale is correct is to calculate the distance of a room.

    3. Type infodist in the QCAD command line and find the distance between two walls in a room.

      Note: The distance measured in this example is 5410.5497, and the dimensions of the room are known to be about 5.4 meters. Therefore the scale in this example is 1:1000, and the vector map must be scaled by 0.001.

      A computer screen shot of a house  Description automatically generated
    4. Select all objects.

    5. Type scale in the command line.

    6. Input 0.001 in the Scale Options box then select OK.

  15. Save the .dwg file as a .dxf file.

  16. Open NavVis IVION to import the .dxf file.

    1. Once logged into the instance, select the eye icon and check Show Vector Map Editor.

  17. Input the Source Coordinate System, selecting the same CRS (EPSG 25832 - ETRS89 / UTM zone 32N) you used for QGIS.

    1. Upload the .dxf file.

    2. Edit the .dxf height, attributes and names as you wish.

Troubleshooting

  • If the upload fails, there may be an issue with the file's encoding. You can try to re-save it with the current version of your editing program and then re-upload it.

  • Unknown geometry types are ignored, which can lead to holes in your .dxf file. Currently, the fastest workaround is to directly edit the .dxf file and explode the unsupported geometries, such as Block References.

Vector Maps List

The tree view shows all uploaded .dxf files and can be expanded to show the layers. Next to each item is a badge showing the number of polygons and the number of vertices in the map.

Underneath the title of each vector map are the  Edit and  Jump to map fields. After selecting the  Edit pencil, Min height and Max height fields become visible. They can be used to define when the map is shown. Additionally, the View and Edit fields can be used to control access to the vector maps.

When expanding a map, all layers and their colors as defined in the .dxf file are shown. Visibility of a layer can be toggled by clicking the icon on the right. This setting is saved on the server and takes effect for all users.

You can select maps and layers with your cursor. The toolbar buttons on the bottom operate on the currently selected items (Show All, Hide All, Delete).

vector_map_editor2

Visibility of Map Layers

Once the upload is complete, a new  map entry is appended to the list and a  map layer for each layer in the .dxf file.

The visibility of vector map layers is controlled by two conditions:

  • The visibility of the map containing the layer.

  • The visibility setting of the layer.

For a layer to be shown, both of these conditions need to be true.

Visibility of the Map

The vector map is visible if  ANY of the following conditions apply:

  • The z coordinate of the currently shown panoramic image's floor is between -100 and 100. To disable this mechanism you can omit one or both of these values.

  • The name of the currently selected floor matches the name of the .dxf layer. If the layer name starts with _, the map will be shown regardless of the current floor.

Performance and Level-of-Detail

To improve performance and reduce download times, delete all the layers that are not required.

You can make them invisible with a toggle, but make sure to delete these layers before going into production mode. Layers that were marked invisible in the .dxf file are imported too, so you should review the vector map list after import in order to remove them.

After removing maps and/or layers, reload the page before evaluating the performance.

Because there is no level-of-detail mechanism, you have to simplify the .dxf file as much as possible. Every polygon adds to the download time and slows down rendering. The badges with polygon and vertex counts give an indication of how complex the maps and layers are.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.