G-code

G-code (Laser Engraving / CNC)

Open Beta
.gcode · text/x-gcode

Export OpenStreetMap map data as G-code for laser engraving and CNC milling. Create physical maps on wood, metal, acrylic, and other materials using laser engravers and CNC routers.

Export G-code now ✨ Open Beta — free, no limits

Key Features

Optimized toolpaths for laser engraving
Speed and power settings for laser
GRBL and Marlin firmware support
Separate layers for multi-pass processing
Example G-code export (central Moscow, 1x0.5 km)
Example: central Moscow, ~1×0.5 km, medium detail

About G-code Format

G-code is the control language of numerically controlled machines (ISO 6983, also known as RS-274): a sequence of commands saying "move there", "turn the tool on", "run at this feed rate". Laser engravers, milling machines and plotters speak it, and the GRBL and Marlin firmwares understand it directly.

A map in G-code is not an image but a set of toolpaths. Every OpenStreetMap line becomes a tool path, and the machine repeats it on wood, plywood, acrylic, leather or anodized aluminium. That is how people make city plan panels, gift maps and relief models.

The file is plain text you can open in a text editor. First comes a header with the job parameters, then the map layers one after another, each with its own comment so the operator can skip a pass or reorder it. The commands are standard: G90 for absolute coordinates, G21 for millimeters, G0 for a rapid move, G1 for a working move, M3 and M5 to turn the tool on and off.

The geometry is fitted into the work area with margins along the edges, 300x300 mm by default, and the scale is chosen automatically so that the map fits entirely and keeps its proportions. Power is set per layer: roads run at full, buildings weaker, green areas very weak — which gives different depths on the material.

What Program Opens G-code Files

The following programs and applications can open, edit, and work with G-code (Laser Engraving / CNC) (.gcode) files exported from OSM2CDR:

💻LightBurn 💻LaserGRBL 💻Fusion 360 💻LinuxCNC 💻Mach3

Format specifications

Who Uses G-code Maps

🏗
Laser engraving maps on wood
A city plan cut on plywood or wood — the road lines become relief.
💻
CNC milling topographic maps
Contours and boundaries as cutter paths for a 3D model of the territory.
📊
Decorative map wall art
Wall panels with a district map: pure vector with no raster artifacts.
🎨
Personalized map gifts
A map of your home town or a meeting place as a personal handmade gift.

How to Export G-code

1
Select area
Draw a rectangle or polygon on the interactive map at osm2cdr
2
Choose G-code
Select G-code (Laser Engraving / CNC) from the list of 127 available export formats
3
Export
Click Export and receive your .gcode file in 1-5 minutes
4
Download
Download the ready G-code file and open it in LightBurn

How to Open After Export

Popular maps in G-code

Free

Get G-code (Laser Engraving / CNC) map exports

Download professional G-code maps from OpenStreetMap. Instant generation, any area.

Free / export
Export G-code now →

Frequently Asked Questions

Which laser engravers are supported?
Can I use this for CNC milling?
What materials can be engraved?
What work area is the file calculated for?
Are all the layers processed the same way?
What should I do before the first run?

Related Formats

Frequently Exported Together

Related Articles