.. index:: single: Exporting and Importing single: Exporting single: Importing Exporting and Importing ======================== .. index:: single: Native File Formats Native File Formats ------------------- IQcad uses two native file formats: .. list-table:: :header-rows: 1 :widths: 15 85 * - Format - Description * - **.iqz** - **Compressed** (gzip-compressed IQML). This is the default format for new drawings. Files are typically 5-10x smaller than uncompressed IQML. * - **.iqml** - **Uncompressed** XML-based format. Human-readable and suitable for version control or debugging. Both formats are auto-detected on open. Use **File > Save As…** to choose between them. Large drawings with 1 000 000+ entities use a **streaming writer** that writes directly to the file instead of building an in-memory DOM tree, keeping memory usage constant. .. index:: single: Exporting Exporting --------- .. index:: single: DXF Export DXF Export ~~~~~~~~~~ **File › Export › DXF…** exports the current drawing to an AutoCAD- compatible DXF file. - All layers, colours, linetypes, and linewidths are preserved. - Supports ASCII (R12, R2000, R2018) and Binary (R2000, R2018) formats, selectable in the export dialog. - AEC Survey Points are exported as standard POINT entities. - Tunnel Section Line deviation annotations are exported as LINE and TEXT entities. - Polyface mesh entities are exported as a DXF ``MESH`` (AcDbSubDMesh) on R2000 and R2018, so the mesh stays one object. R12 export does not write the mesh. A DXF ``POLYLINE`` with the polyface-mesh flag is still imported. - ACIS-based entities (3DSOLID, REGION, SURFACE) are passed through on export — their SAT/SAB data is preserved unchanged so they can be opened in AutoCAD or other ACIS-capable software. .. index:: single: Image Export Image Export ~~~~~~~~~~~~ **File › Export › Image…** saves a raster snapshot of the current view. - Supported formats: PNG, BMP. - The exported image represents the current zoom and pan position. .. index:: single: SVG Export SVG Export ~~~~~~~~~~ **File › Export › SVG…** creates a Scalable Vector Graphics file. - Suitable for embedding in reports, web pages, or vector editing tools. - All geometry is preserved at full precision. .. index:: single: DWG Export DWG Export ~~~~~~~~~~ **File › Export › DWG…**, or **File › Save As…** with the DWG filter, writes the current drawing to AutoCAD's native DWG binary format. - Written **in process** by IQcad's own DWG writer. No external converter is needed, and nothing is routed through a temporary DXF. - Six target versions — R2000, R2004, R2007, R2010, R2013 and R2018 — chosen once in **File › Settings › DWG › Save Version**. R2018 is the default; R2000 is the most widely readable. - Survey points and TIN surfaces are exported according to the **Survey objects** setting: as genuine Civil 3D objects, as plain geometry with or without labels, or not at all. - A drawing opened from DWG and saved again without being edited is re-emitted byte for byte. :doc:`14_dwg` covers version support, the entity list, the survey-export modes and the fallback converters in full. .. index:: single: PDF Export PDF Export ~~~~~~~~~~ **File > Export > Export PDF** or the ``EXPORTPDF`` command exports the active layout to a PDF file. Use ``PLOTALL`` to export all layouts to a single multi-page PDF. - Supported from model space and paper space (layout) tabs. - Page size and orientation come from the **Page Setup** dialog. - Plot style tables (CTB) are applied if configured. .. index:: single: LandXML Export LandXML Export ~~~~~~~~~~~~~~ **File › Export › LandXML…** writes survey data to LandXML 1.2 format. - **Survey Points** → ```` elements. - **Polylines** → ```` elements. - **Surfaces** → ```` with full ````, ````, ```` (outer + island, inline NEZ point lists), ```` (each polyline as ````) and an IQcad ```` block carrying the surface edit log. - **Point Groups** → top-level ```` with each group's name, description, visibility flag and point-number membership. Each surface also emits ```` listing the names of the point groups it was built from. Polylines that are already attached to a surface as breaklines are not re-exported as alignments — they round-trip as breaklines only. The IQcad-namespaced ```` blocks are vendor-private and are ignored by other LandXML consumers. Coordinate mapping: World X → Easting, World Y → Northing. .. index:: single: GeoJSON Export GeoJSON Export ~~~~~~~~~~~~~~ **File › Export › GeoJSON…** exports drawing entities to a GeoJSON file. - Points, lines, polylines, arcs, and circles are exported. - Arc and circle entities are tessellated into line segments. - Bulge arcs in polylines are tessellated. - A coordinate system dialog allows selecting the target EPSG code (default WGS 84). Coordinates are transformed from drawing units to the selected CRS. .. index:: single: KML / KMZ Export KML / KMZ Export ~~~~~~~~~~~~~~~~ **File › Export › KML…** exports drawing entities to KML format; choose the ``.kmz`` filter in the save dialog to write a compressed KMZ archive. - Features are grouped into KML Folders by layer name. - Coordinates are transformed to WGS 84 (longitude/latitude). .. index:: single: Importing Importing --------- .. index:: single: Open DXF Open DXF ~~~~~~~~~ Use **File › Open…** and select a ``.dxf`` file. IQcad supports DXF R12 and R2000. Both ASCII and binary DXF files are supported and auto-detected. Layers, colours, linetypes, lines, polylines, arcs, circles, texts, and hatches are imported. Additional 3D entity support on import: - **Polyface meshes** — DXF ``MESH`` entities, and DXF ``POLYLINE`` entities with the polyface-mesh flag, are imported as native polyface mesh entities. Use ``EXPLODE`` to break them into individual 3D Faces or ``MESH2SURFACE`` to convert to a TIN surface. - **ACIS entities** — 3DSOLID, REGION, BODY and SURFACE entities are imported as pass-through objects. Their ACIS SAT/SAB geometry data is preserved so that re-exporting to DXF **or DWG** produces a valid file, but IQcad does not render or edit the ACIS geometry itself. These entities appear in the drawing as bounding-box placeholders on their original layer. See :doc:`14_dwg` for how the solid is carried at each DWG version. .. index:: single: Open / Import DWG Open / Import DWG ~~~~~~~~~~~~~~~~~~ Use **File › Open…** and select a ``.dwg`` file, or **File › Import › DWG…** - Read **in process** by IQcad's own DWG reader — no external converter, no temporary DXF. - R2000 through R2018 are read natively, including blocks, attributes, hatches, dimensions, tables, meshes, wipeouts, ACIS solids, layouts and viewports. - Civil 3D objects in the file — COGO points, point groups, TIN surfaces, parcels and alignments — are decoded into IQcad's own civil objects and appear in the Prospector. - Versions the native reader does not cover (R13/R14, R2025) fall through to **LibreDWG** or the **ODA File Converter** if either is installed. See :doc:`14_dwg` for the full support matrix, the backend preference and how to install the fallback converters. .. index:: single: LandXML Import LandXML Import ~~~~~~~~~~~~~~ **File › Import LandXML…** opens the LandXML import dialog. .. code-block:: text ┌─────────────────────────────────────────────────────────────┐ │ File: [path/to/survey.xml ] [...] │ │ │ │ Elements found: │ │ ☑ CgPoints (125) Layer: [Survey Points ] │ │ ☑ Alignments (3) Layer: [Alignments ] │ │ ☑ Surfaces (1) Layer: [Surface ] │ │ ☑ Import as points ☑ Import as faces │ │ ☐ Parcels (0) │ │ │ │ [Import] [Cancel] │ └─────────────────────────────────────────────────────────────┘ .. list-table:: :header-rows: 1 :widths: 20 30 50 * - LandXML element - Imported as - Notes * - **CgPoints** - AEC Survey Points - PointNumber, Name, Northing/Easting/Elevation, Description preserved. * - **Alignments** - Polylines - Arc elements are tessellated to line segments. * - **Surfaces** - Points and/or 3D Face tiles, **or** a native AEC surface - Toggle *Import as points* and *Import as faces* independently. When imported as a native surface, ````, ```` and the ``IQcadEdits`` / ``IQcadSourceGroups`` feature blocks are restored automatically. * - **Parcels** - Closed polylines - Boundary curves tessellated. If the file contains an ``IQcadPointGroups`` feature, the survey database's point groups are recreated and members re-assigned after the ```` are loaded. Coordinate mapping: LandXML Northing → Y, LandXML Easting → X. IQcad auto-detects LandXML versions 1.1 and 1.2 from the ``xmlns`` attribute. .. index:: single: GeoJSON Import single: Esri JSON Import single: Hellenic Cadastre GeoJSON and Esri JSON Import ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **File › Import › GeoJSON…** imports a GeoJSON file or an Esri feature-set JSON file. The menu item stays **GeoJSON**. The open dialog is titled **Import GeoJSON or Esri JSON** and lists ``.geojson`` and ``.json``. IQcad tells the two formats apart from the file contents. A document whose root ``type`` is ``FeatureCollection``, ``Feature``, or a geometry name is read as GeoJSON. **File › Export › GeoJSON…** writes GeoJSON only. The CRS dialog that follows asks for the drawing coordinate system. The default is EPSG:2100 (GGRS87 / Greek Grid). Its prompt still describes the incoming data as WGS 84. That description matches a GeoJSON file. An Esri file names its own source system, and the dialog choice is the coordinate system the geometry lands in. The command requires the **Civil** module. **GeoJSON** - FeatureCollection, Feature, and a bare geometry object. - Point, LineString, Polygon, the Multi* variants, and GeometryCollection. - Coordinates are WGS 84 degrees (EPSG:4326) and are projected into the drawing CRS chosen in the dialog. - Each polygon ring, including a hole, becomes its own closed polyline. A line becomes a polyline. A point becomes a CAD point. - The CAD layer is the feature ``name`` property, or ``GIS_Import`` when that property is empty. **Esri feature-set JSON** This is the JSON from an ArcGIS feature service and from the Hellenic Cadastre map, `maps.ktimatologio.gr `_. There is no GeoJSON ``type``. Attributes sit under ``attributes``. A polygon is stored as ``rings`` and a polyline as ``paths``. - ``spatialReference.wkid`` is the source EPSG. ``latestWkid`` is used when ``wkid`` is absent. A Κτηματολόγιο extract uses **2100**, so the coordinates are already Greek Grid metres. Leave the drawing CRS at **2100** and the metres are copied as they stand. Another drawing CRS projects them into that system. - A file that names no wkid is placed in the drawing CRS with its coordinates unchanged. - Each ring of a polygon, including holes, is one closed polyline. Each path is a polyline. ``points`` and an ``x`` / ``y`` pair become CAD points. A feature with no geometry is skipped. - The CAD layer is the ``LAYER`` attribute. On a Κτηματολόγιο extract that is the layer name written in the file, for example ``ΛΕΙΤΟΥΡΓΟΥΝ ΚΤΗΜΑΤΟΛΟΓΙΟ``. - ``KAEK`` is the entity **Name**. ``AREA`` is the entity **Description** (the official area, shown in the Object Inspector). - Polygons come in as closed polylines, one per ring, so a hole keeps its own outline. Parcel objects are created with ``CREATEPARCEL``. .. index:: single: KML / KMZ Import KML / KMZ Import ~~~~~~~~~~~~~~~~ **File › Import › KML/KMZ…** imports geographic data. - KMZ archives are decompressed transparently. - Placemarks with Point, LineString, and Polygon geometry are imported. - Folder hierarchy is traversed recursively. - A CRS dialog lets you specify the target drawing coordinate system. .. index:: single: Shapefile Shapefile ~~~~~~~~~ ESRI Shapefile is the format used by QGIS, ArcGIS and GDAL for GIS data exchange. IQCAD can both import and export shapefiles, including their sidecar files (.shx record index, .dbf attribute table, .prj projection WKT, .cpg text codepage). **Import** * Menu: ``Files → Import → Shapefile...`` * Ribbon: ``Output → Import → Shapefile`` The CRS picker dialog opens after file selection so you can choose the target EPSG (the .prj sidecar is auto-matched against 9 known presets; unknown WKT falls through to the dialog). **Export** * Menu: ``Files → Export → Shapefile...`` * Ribbon: ``Output → Export → Shapefile`` The export dialog asks for a basename without extension. Because the shapefile format requires one geometry type per file, IQCAD splits the output into up to three groups: * ``_points.shp`` -- all Point + MultiPoint features * ``_lines.shp`` -- all PolyLine features * ``_polygons.shp`` -- all Polygon features Empty groups produce no files. After export, a message lists exactly which files were written. For full reference (geometry coverage, DBF schema, CRS support, permissive vs. strict modes) see ``cad/_documentation/io/shapefile.rst`` in the source tree. GPX ~~~ GPX 1.1 (`GPS Exchange Format `_) is the de-facto interchange for GPS units, hiking apps (Garmin, OsmAnd, Strava, Komoot), and OpenStreetMap editors. IQCAD reads and writes GPX 1.1 only; GPX 1.0 files are rejected with a clear error — re-save them in 1.1 first. **Import** * Menu: ``Files → Import → GPX...`` * Ribbon: ``Output → Import → GPX`` **Export** * Menu: ``Files → Export → GPX...`` * Ribbon: ``Output → Export → GPX`` **What round-trips** * Waypoints (````) ↔ point entities * Routes (````) → polyline entities (read only — see below) * Tracks (```` with one or more ````) ↔ polyline entities * Per-vertex elevations (````) * Track-level start/end timestamps stored as ``time_start`` / ``time_end`` attributes (per-vertex ``