What is a DXF File?
A DXF is a structured, mostly human-readable drawing exchange file — points, lines, polylines, arcs, circles, text and 3D faces, each sitting on a named layer. It is the format that gets a drawing from one program to another when nothing else will, and almost every survey, GIS and design package reads and writes it — which also makes it the format most likely to open looking slightly wrong. Here is what is inside one, and what to check when it does.
What a DXF actually contains
A DXF is a drawing exchange file: a structured, mostly human-readable description of geometry. Points, lines, polylines, arcs, circles, text and 3D faces, each sitting on a named layer.
Layers are the organising principle. Contours on one, breaklines on another, boundaries on a third — layer names are how the receiving software knows what it is being handed, so they carry more meaning than people usually give them credit for.
Blocks let a repeated symbol — a tree, a manhole, a survey marker — be defined once and placed many times. That keeps files small, but a block is only as portable as its definition.
What a DXF does not contain
A coordinate reference system. This is the single biggest source of confusion. A DXF holds numbers, not a declaration of what those numbers mean.
The coordinates might be a projected grid in metres, a local site grid with an arbitrary origin, or millimetres from a corner of the sheet. Nothing in the file says which. Two DXFs can both be "correct" and land kilometres apart.
Units are equally slippery. A DXF has a units header, but it is often left at the default and ignored by the exporting program. A drawing in millimetres opened as metres is a thousand times too big — an unmistakable failure. A drawing in feet opened as metres is only 3.28 times off, which is far more dangerous because it can look plausible.
2D or 3D?
Elevation in a DXF can live in two very different places. In a true 3D drawing every vertex carries a Z value. In a flattened 2D drawing the geometry sits at Z = 0 and the elevation exists only as a text label beside the line.
Contours exported flat are the usual case. They look right on screen and are useless as a surface, because the height information is text, not geometry.
If you intend to build a surface from a DXF, check that the polylines actually carry Z. It takes seconds and saves an afternoon.
When a DXF opens wrong
Work through it in this order, because the symptoms overlap.
| Symptom | Likely cause | What to do |
|---|---|---|
| Nothing visible | The drawing is fine but far from the view — or one stray entity at a huge coordinate is stretching the extents | Zoom to extents; if the extents are absurd, find and remove the stray entity |
| Everything ~1000× off | Millimetre/metre unit mismatch — unmistakable at this ratio | Re-import with the correct unit |
| Everything ~3.28× off | Feet/metre mismatch — dangerous because it can look plausible | Check the units header and the exporting program's settings |
| Correct shape, wrong place | Coordinate system or local-grid issue: the geometry is right, the datum it was drawn against is different | Find out which grid it was drawn in, then georeference or transform |
| Missing symbols | Blocks that did not travel with the file, or an external reference never bound in | Ask for the file with blocks bound in |
| Flat where it should have height | A 2D export — elevation exists only as text labels | Request a true 3D export with Z on every vertex |
Working with DXF and terrain together
DXF is where a terrain job usually starts and ends. Boundaries, design lines and existing services arrive as DXF and need to be draped over the surface to make sense; plans, cross-sections and profiles go back out as DXF because that is what the construction set expects.
STREAM imports DXF drawings and displays them on the terrain, and exports plans, sections and profiles back to DXF. The rule that keeps it painless is the same one that applies to every other layer: know the coordinate system and the units of the file before you bring it in, because the file will not tell you.
Frequently asked questions
What does a DXF file actually contain?
A DXF is a structured, mostly human-readable description of geometry — points, lines, polylines, arcs, circles, text, and 3D faces — each placed on named layers, with blocks letting repeated symbols like trees or manholes be defined once and placed many times.
Does a DXF file include coordinate system or unit information?
No — a DXF has no coordinate reference system, so its numeric coordinates don't declare whether they're a projected grid in metres, a local site grid, or millimetres from a sheet corner; it does have a units header, but programs frequently leave it at default and ignore it.
How do I know if a DXF has real 3D elevation or is just flattened to 2D?
Check whether polylines carry actual Z values at every vertex (true 3D) versus sitting at Z=0 with elevation shown only as text labels beside the lines (flattened 2D) — flat contours look fine on screen but are useless for building a surface model since the height only exists as text.
Why might a DXF open at the wrong size or in the wrong location?
It's usually a unit mismatch — a size ratio around 1,000x points to millimetres read as metres, while about 3.28x points to a feet-to-metres mixup — or a coordinate/local-grid difference, where the shape looks correct but sits at the wrong location because the datum differs.
Import and export DXF in STREAM
Native Windows · fully offline · free beta