Terrace

Importing and exporting

This chapter shows how to bring data from other programs into a Terrace project — LandXML, LiDAR point clouds, elevation grids, GIS files and Google Earth KML — and how to send your design back out as LandXML, Shapefile, GeoJSON or Google Earth KML. You'll be able to start a project from almost any survey or mapping data and hand your work to other civil programs.

Where the imports and exports are

Every import is on the Survey tab, in the Import group: LandXML, GIS Data, Point Cloud and Elevation Grid. Point files and total-station raw files sit in the Points and Survey Data groups beside them; they are covered in Survey and points. The Surfaces tab repeats two of them as From Point Cloud and From Elevation Grid, because both make a surface.

The Survey ribbon tab with the Points, Survey Data, Import and Project groups; the Import group holds LandXML, GIS Data, Point Cloud and Elevation Grid.
The Survey tab. The Import group holds the four imports of this chapter.

The exports are on the Sheets tab, in the Export group: LandXML, GIS Data, Google Earth and DWG / DXF.

The Sheets ribbon tab; its Export group holds LandXML, GIS Data, Google Earth and DWG / DXF.
The Sheets tab. The Export group writes your project for other programs.

Each button runs a command, so you can also type it on the command line:

WhatCommandAliases
Import LandXMLIMPORTLANDXMLLANDXMLIN
Export LandXMLEXPORTLANDXMLLANDXMLOUT
Import a point cloud (LAS/LAZ)IMPORTLASLASIN
Import an elevation grid (GeoTIFF, ASCII grid)IMPORTDEMDEMIN
Import GIS data (Shapefile, GeoJSON, KML, KMZ)IMPORTGISGISIN
Export GIS data (Shapefile, GeoJSON)EXPORTGISGISOUT
Export Google Earth (KML, KMZ)EXPORTKMLKMLOUT

Typed plainly, an import command asks for the file and then opens its dialog, where you see what's in the file and choose what to bring in. Each import is one undo step: ⌘Z takes the whole import back.

Note If no project is open when you click an import button, Terrace starts a new project first (DPWH, metric) and imports into it.

Importing LandXML

LandXML is the exchange format every civil program speaks: Civil 3D, 12d, InRoads, machine-control systems. Import it when a consultant hands you their survey, surfaces or alignments, or to carry a design over from another program.

  1. Click Survey ▸ LandXML (or type IMPORTLANDXML, alias LANDXMLIN), and choose the .xml file.
  2. Read the summary at the top of the Import LandXML dialog. It says the LandXML version, the program that wrote the file and the file's length unit.
  3. Tick the kinds of objects you want. Each kind shows how many the file holds and the first few names.
  4. If the file has points, choose what happens to Point numbers already used.
  5. Click Import.
The Import LandXML dialog for 11_simple_road.xml: LandXML 1.1 from Autodesk Civil 3D 2005 in feet, a note that lengths will be converted to metres, ticked kinds Points (16), Surfaces (1) EG, Alignments (3), Profiles (4) and Cross sections (1), the point-number choice and the Convert lengths check box.
Importing a Civil 3D file in feet into the Teresa Bypass project. Every kind in the file is ticked at first.

What comes in

The dialog lists only the kinds the file holds, from these eight: Points, Point groups, Surfaces, Alignments, Profiles, Cross sections, Pipe networks and Parcels. Untick a kind to leave it out. Surfaces come in with their own triangles, so the TIN is exactly the one the other program made.

When a name is already used in your project, the new object gets a number added: a second surface called EG comes in as "EG (2)". Nothing in your project is renamed or replaced.

Point numbers that clash

Survey point numbers must be unique. When the file's points use numbers your project already has, you choose:

  • Give new numbers (the default): the file's points get the next free numbers.
  • Skip those: points whose numbers are taken are left out.
  • Replace the old: the project's points with those numbers take the file's coordinates, elevation and description.

Units

When the file is in feet and your project in metres (or the other way round), the dialog says so, and Convert lengths to the project's units is ticked: every coordinate, elevation and length is scaled. Untick it only if you know the numbers are already in your units and the file's unit tag is wrong.

The command line then lists what came in, and the conversion used:

The command history after the import: Imported from 11_simple_road.xml: 16 points, 1 surfaces, 3 alignments, 4 profiles. Lengths converted from foot (× 0.3048).
The import's report on the command line. The same line shows briefly at the bottom of the window.

Tip Opening a .xml file with File ▸ Open… (⌘O), or dropping it on the window, also runs this import, into the current project (or a new one).

Exporting LandXML

Export LandXML to give your design to another civil program, to a reviewer, or to a contractor's machine-control system.

  1. Click Sheets ▸ LandXML (or type EXPORTLANDXML, alias LANDXMLOUT).
  2. Untick anything you don't want to send. Every object is ticked at first, listed by kind: Points and point groups, Surfaces, Alignments, Pipe networks (storm, sanitary and pressure), Parcels and Sample lines & sections.
  3. Choose the LandXML version: 1.2 (the default, read by current programs) or 1.1 for older ones.
  4. Click Save… and pick the file. Terrace suggests the project's name, such as Teresa Bypass Road (Sample Project).xml.
The Export LandXML dialog for the sample project: Points and point groups (2134 points), surfaces EG, Teresa Bypass Corridor Top and Datum, alignment Teresa Bypass CL, pipe networks Cross Drain CD-1 and Storm Drain SD-1, parcels San Roque Lots, sample lines Teresa Bypass Sections, and LandXML version 1.2 or 1.1.
Exporting the Teresa Bypass Road. Profiles go out with their alignments, so they aren't listed on their own.

Point clouds (LAS and LAZ)

A LiDAR or drone survey gives you a point cloud: millions of points, each with a class saying what it hit — ground, trees, buildings, water. Terrace turns a cloud into a surface. You keep the ground points for a terrain model, and thin them so the surface stays quick to work with.

  1. Click Survey ▸ Point Cloud or Surfaces ▸ From Point Cloud (command IMPORTLAS, alias LASIN), and choose a .las or .laz file.
  2. Read the summary: the LAS version, the number of points, the area they cover and the lowest and highest elevation. If the file names a coordinate system that differs from the project's, the dialog says so — the points are not transformed.
  3. Under Classes, tick the classes to keep.
  4. Under Thinning, choose how many points to keep.
  5. Check the Surface name (the file's name at first) and click Import.
The Import Point Cloud dialog: LAS 1.2, 400 points over 299.1 by 297.2, elevations 5.08 to 59.83; classes Unclassified, Ground (ticked), Low vegetation, High vegetation, Building and Water with their counts; thinning by One point per grid cell of 0.75 m keeping the Lowest point; surface name las12_f1.
A small LAZ cloud. Only Ground is ticked, and the grid cell is worked out from the cloud's size.

Classes

Each class found in the file is listed with its standard ASPRS name (Ground, Low/Medium/High vegetation, Building, Noise, Water, Road surface, Bridge deck…) and how many points it has. For a big file (over about 4 MB) the counts come from every 100th point and read "about …".

Terrace ticks Ground alone when the cloud has ground points, because that's what a terrain surface needs. When it has none (an unclassified cloud), every class is ticked except noise.

Thinning

  • One point per grid cell (the default) lays a square grid over the cloud and keeps one point per cell. The Grid cell starts at a size that leaves about 150,000 points. Point kept per cell chooses which: Lowest (the default, best for bare ground under grass and brush), Average or Highest.
  • Every n-th point keeps every n-th point of the file, as it comes.

The new surface appears in the Project browser under Surfaces, drawn with the standard surface style. If the choices leave fewer than three points, the dialog asks you to tick more classes or thin less.

Elevation grids (GeoTIFF and ASCII grid)

A DEM (digital elevation model) is a grid of elevations, one per cell, like the national IFSAR or SRTM data. Import one when you don't have a field survey yet, for route studies and catchment areas.

  1. Click Survey ▸ Elevation Grid or Surfaces ▸ From Elevation Grid (command IMPORTDEM, alias DEMIN), and choose a GeoTIFF (.tif, .tiff) or Esri ASCII grid (.asc).
  2. Read the summary: columns × rows, the cell size, the lower-left corner, the elevation range and how many cells have no data.
  3. Set Use every … th cell. Terrace starts with the smallest step that keeps the grid under about 250,000 cells; 1 takes every cell.
  4. Check the Surface name and click Import.
The Import Elevation Grid dialog: 5 × 6 cells of 2.5, lower left E 1000.5 N 2000, elevations 99.76 to 113.22, Use every 1 th cell, Surface name grid.
An ASCII grid. The result is a grid surface: it keeps the cells as they are instead of triangulating them.

Cells with no data are left as holes in the surface. As with point clouds, a grid in another coordinate system is reported but not transformed.

GIS files (Shapefile, GeoJSON, KML and KMZ)

GIS layers carry things like existing roads, lot lines from the assessor, river banks or spot heights. Import them to start your base map or to bring in linework you'll design against. Lines and places someone traced in Google Earth (KML or KMZ) come in the same way.

  1. Click Survey ▸ GIS Data (command IMPORTGIS, alias GISIN) and choose a Shapefile (.shp, with its .dbf and .prj beside it) a GeoJSON file (.geojson, .json), or a Google Earth file (.kml, or .kmz, a zipped KML).
  2. Read the summary: the layer's name, how many points, lines and polygons it has, its attribute fields, and its coordinate system.
  3. Choose what the features become, where elevations come from, and the name.
  4. Click Import.
The Import GIS Data dialog for poly.geojson: 0 points, 0 lines, 3 polygons, field LOT, coordinate system EPSG:4326; Lines and polygons set to Parcels; Elevation from the geometry's Z; Name / layer poly; Transform from EPSG 4326 to the project's EPSG:3123 ticked.
Three lot polygons in GeoJSON, brought in as parcels and transformed from longitude/latitude to the sample project's PRS92 zone 3.

What becomes what

In the fileChoiceIn the project
Point featuresCOGO points (default)Survey points, numbered from the next free number, in a new point group named after the layer. Description from picks the field for their descriptions (a field called desc, description, code or name is chosen for you).
Leave outNothing.
Lines and polygonsFeature lines (default)3D feature lines named "layer 1", "layer 2"… — ready for grading or as corridor targets.
PolylinesOrdinary drawing polylines on a layer named Name / layer, at the feature's elevation.
BreaklinesBreaklines added to the surface you pick in Into surface; the surface is rebuilt.
ParcelsLots in a new parcel site named after the layer (polygons only; the dialog warns when the layer has none).
Leave outNothing.

Elevations

Elevation from is (the geometry's Z) at first, which uses 3D coordinates when the file has them. Pick a field instead when heights are stored as an attribute — contour shapefiles usually have one. Terrace chooses a field called z, elev, elevation, contour or one containing "height" for you.

Coordinate transforms

GIS data is often in a different coordinate system from your design. When your project has one (set it with Survey ▸ Coordinate System, COORDINATESYSTEM, or in Project Settings), the dialog shows Transform from EPSG … to the project's EPSG:…:

  • A Shapefile's system is read from its .prj file.
  • GeoJSON is always longitude/latitude (EPSG:4326), as the GeoJSON standard says.
  • KML and KMZ are always WGS 84 longitude/latitude (EPSG:4326), as Google Earth writes them.
  • The box is ticked when both systems are known and differ. You can type another EPSG code if the file's is missing or wrong.

When the project has no coordinate system, coordinates come in as they are, and the summary says so.

KML and KMZ

A KML file's folders are read together as one layer named after the file. Its placemarks' points, paths and polygons are the layer's points, lines and polygons, and their name, description and extended data become fields. The choices are the same as for any GIS file:

The Import GIS Data dialog for sample.kml: Layer sample: 2 points, 1 lines, 1 polygons; fields name, description, elev, kind; its coordinate system is EPSG:4326. Point features COGO points, Description from name, Lines and polygons Feature lines, Elevation from elev, Name / layer sample, Transform from EPSG 4326 to the project's EPSG:3123 ticked.
A KML file dropped on the sample project: two placemark points, a path and a polygon, transformed from WGS 84 to PRS92 zone 3.

Terrace picks name for the points' descriptions and an elevation field (here elev) when the file has one; otherwise heights come from the coordinates' altitude. Each ring of a polygon (its outline and any holes) becomes a feature line of its own, so this file, with one path and a multi-part polygon of three rings, gives “Imported 2 points (group sample), 4 feature lines.”

Google Earth (KML and KMZ)

A KML or KMZ file opens in Google Earth, so anyone can see your road on the satellite picture without Terrace.

  1. Make sure the project has a coordinate system (Survey ▸ Coordinate System). Without one Terrace can't place the design on the globe, and the command stops with "KML needs the project's coordinate system".
  2. Click Sheets ▸ Google Earth (or type EXPORTKML, alias KMLOUT).
  3. Type the file name on the command line, ending in .kml or .kmz (a zipped KML, smaller), and press Enter.
The command line: Command: -EXPORTKML, KML or KMZ file to write: teresa.kmz, Wrote 2165 features in 5 folders to teresa.kmz.
The sample project to Google Earth: one folder per kind of object.

The file holds a folder for each kind the project has — points, parcels, alignments, feature lines, pipes and catchments — with their names and main values as attributes.

To bring KML or KMZ in, use Survey ▸ GIS Data (see KML and KMZ above).

Exporting GIS data

Send your parcels to the assessor's GIS, or your alignment and drainage to a planning office, as a Shapefile or GeoJSON.

  1. Click Sheets ▸ GIS Data (or type EXPORTGIS, alias GISOUT).
  2. Type the file name, ending in .shp or .geojson, and press Enter.
  3. Choose what to export: Points, PArcels (the default), Alignments, Feature lines, PIpes or Catchments. Type the capital letters (PA, PI…) or click the choice.

One kind goes in each file, with useful attributes: points carry number, description and elevation; parcels their site, number, name, kind and area; alignments name and length; pipes network, name, part and both inverts; catchments name, runoff coefficient C and area in hectares.

  • Shapefile: Terrace writes the .shp, .shx and .dbf, plus a .prj with the project's coordinate system when it has one.
  • GeoJSON: coordinates are turned into longitude/latitude when the project has a coordinate system, as GeoJSON expects.

Point files (EXPORTPOINTS) are covered in Survey and points.

Drag and drop

The quickest way to import is to drag a file from Finder onto the Terrace window. Terrace looks at the file's extension:

Dropped fileWhat happens
.xmlThe LandXML import dialog.
.csv, .txt, .pnt, .nez, .pnezd, .xyzThe point file import dialog.
.rw5, .sdr, .gsiThe raw survey data import dialog.
.las, .lazThe point cloud import dialog.
.tif, .tiff, .ascThe elevation grid import dialog.
.shp, .geojson, .json, .kml, .kmzThe GIS import dialog.
.terrace, .dwg, .dxfOpens the project or drawing in a new tab.
.png, .jpgAttaches the image to the drawing.
.scrRuns the script file in the drawing.

The file goes into the project you're looking at; if the current tab isn't a project, a new project is made for it. The command line says "Importing file: choose what to bring in."

The Terrace window with the sample project open and the Import GIS Data dialog over the plan, opened by dropping poly.geojson on the window; the command line reads Importing poly.geojson: choose what to bring in.
A GeoJSON file dropped on the sample project opens its import dialog.

A raw survey file saved as .csv or .txt opens the point file dialog when dropped; use Survey ▸ Import Raw File for those. Any other file shows “Terrace opens .terrace projects, LandXML (.xml), .dwg and .dxf files”.

Command-line imports (-IMPORTLANDXML and friends)

Every import and export also has a dash form, as in AutoCAD: -IMPORTLANDXML, -IMPORTPOINTS, -IMPORTRAW, -IMPORTGIS, -IMPORTLAS, -IMPORTDEM, -EXPORTLANDXML, -EXPORTPOINTS, -EXPORTGIS and -EXPORTKML. They ask everything on the command line, with no dialog, so they fit scripts (.scr files) and quick repeat jobs. Type the file's path at the first prompt; Enter alone at any prompt takes the default shown in <angle brackets>.

CommandPrompts after the fileWhat it does
-IMPORTLANDXMLnoneImports everything in the file, with clashing point numbers renumbered.
-IMPORTPOINTSColumn order [Auto/PNEZD/PENZD/PNEZ/PENZ/NEZ/ENZ] <PNEZD>Adds the points in the column order you pick. (Picking Auto currently fails with “the column order "A" has "A"”; pick an order, or use the dialog, which detects it.)
-IMPORTRAWnoneReads RW5, SDR, GSI or raw CSV (by extension) and reduces the observations to points.
-IMPORTGISAttribute holding elevations <geometry Z>Reads Shapefile, GeoJSON, KML or KMZ. Points become COGO points; lines and polygons become polylines on a layer GIS-LAYERNAME, keeping the attributes. Coordinates are transformed when both systems are known.
-IMPORTLASGround points only (class 2)? [Yes/No] <Yes>, then Thin to one point per grid cell of (0 = keep all) <1.00>Makes a surface named after the file, keeping the lowest point per cell. With no ground-classified points it uses every point and says so. The cell you type is remembered for next time.
-IMPORTDEMnoneMakes a grid surface from every cell.
-EXPORTLANDXMLnoneWrites every object as LandXML 1.2.
The command line during -IMPORTLAS: Ground points only (class 2)? [Yes/No] <Yes>:, Thin to one point per grid cell of (0 = keep all) <1.00>: 2, las12_f1: 136 of 136 points (400 in the file).
-IMPORTLAS: ground points only, thinned to one per 2 m cell. The last line tells how many points made the surface.

EXPORTPOINTS, EXPORTGIS and EXPORTKML have no dialog, so their plain and dash forms work the same.

DWG and DXF

Terrace opens DWG and DXF drawings, and Sheets ▸ DWG / DXF (or Output ▸ Save As) saves your project as a plain drawing for anyone with a CAD program. The civil objects go out as their drawn lines, text and hatches — what you see — not as intelligent objects; use LandXML for those. See Projects and files for the details.