KMZ, geo formats and map links

Command: CAPCAD_GEO_EXPORT, CAPCAD_GEO_LINK_MAPS, CAPCAD_GEO_LINK_STREETVIEW, CAPCAD_GEO_LINK_EARTH, CAPCAD_GEO_LINK_MAPS_URL, CAPCAD_GEO_LINK_WEBMAP, CAPCAD_GEO_STREETVIEW_IMAGE, CAPCAD_GEO_IMAGERY_PICK, CAPCAD_GEO_IMAGERY_VIEW, CAPCAD_GEO_IMAGERY_ALIGNMENT, CAPCAD_GEO_HELP Updated 2026-09-03 Also in: Português
Ask about this page
Answers from this page only. General assistant
Commands CAPCAD_GEO_EXPORT (form); and the command-line commands CAPCAD_GEO_LINK_MAPS, CAPCAD_GEO_LINK_STREETVIEW, CAPCAD_GEO_LINK_EARTH, CAPCAD_GEO_LINK_MAPS_URL, CAPCAD_GEO_LINK_WEBMAP, CAPCAD_GEO_STREETVIEW_IMAGE, CAPCAD_GEO_IMAGERY_PICK, CAPCAD_GEO_IMAGERY_VIEW, CAPCAD_GEO_IMAGERY_ALIGNMENT and CAPCAD_GEO_HELP
Shortcut none
Ribbon CapCad tab › Manage panel › Output split button › Conversor KMZ; GIS panel › Tools split button › Entity To/From Text; GIS panel › Identify split button › Google Street View: Web, Point to Google Maps, GeoImage GMaps Click, Google Earth Point, Url from Google Maps/Street view to Point; GIS panel › Data split button › Quick WebMap [Esri Leaflet]
Category GeoData
Form EntityGeoFormatsForm, title "Entity to Geo Format", three tabs (modeless). The other commands have no form
Hosts CAPCAD_GEO_EXPORT, the map links and CAPCAD_GEO_IMAGERY_PICK: AutoCAD, BricsCAD, GstarCAD, ZWCAD, ARES Commander. CAPCAD_GEO_STREETVIEW_IMAGE, CAPCAD_GEO_IMAGERY_VIEW and CAPCAD_GEO_IMAGERY_ALIGNMENT: AutoCAD only

The project leaves the CAD and lands in Google Earth; the world comes into the CAD. A road you have drawn is worth far more when the client can open it on a phone, and a stretch is far easier to design with the satellite image underneath.

  • A KMZ of the vertical signage with a picture of every sign. Each sign becomes a pin with its own drawing in the balloon, grouped by deploy, keep and remove.
  • Six output formats. KML, GPX, GeoJSON, EsriJSON, CapJSON and a CAD script, straight from the selection.
  • And back again. Paste a GeoJSON and it becomes polylines, with the name of one field becoming the layer name.
  • The point you clicked, in the browser. Google Maps, Street View and Google Earth open exactly on the point you clicked in the drawing.
  • The other direction too. Copy a Google Maps link and the command draws that point in your drawing, in the right system.
  • Georeferenced satellite imagery inside the drawing. At a point, at the centre of the screen, or strung out along a whole alignment.

What it does

This page gathers what leaves the drawing for the world and what comes from the world into the drawing. All of these commands need to know the drawing's coordinate system — see Coordinates and the coordinate system, including its coverage limits.

CAPCAD_GEO_EXPORT opens a modeless three-tab form:

  • KML, GPX, JSON, CAD — entities to text in six formats, and text to entities in five.
  • KMZ Vertical — the KMZ of the vertical signage: every selected sign becomes a placemark with an icon and/or a balloon, and the sign's picture travels inside the file.
  • KMZ Horizontal — the selected road markings, turned into dashes with their cadence applied and exported as KML.

The link commands work with one or two clicks and have no form:

Command What it does
CAPCAD_GEO_LINK_MAPS One click → opens google.com/maps on the point and copies the link. The link's zoom is derived from the CAD's current zoom.
CAPCAD_GEO_LINK_STREETVIEW In a loop: each click draws a POINT on layer CAPCAD_GIS_STREETVIEW (colour 150), opens Street View on the point and copies the link. Esc ends.
CAPCAD_GEO_LINK_EARTH One click → writes temp.kml in the project's exports folder and opens it; Google Earth must be the default application for .kml.
CAPCAD_GEO_LINK_MAPS_URL Reads a Google Maps or Street View link from the clipboard, projects the coordinate into the drawing's system and draws a POINT: CAPCAD_GIS_STREETVIEW (colour 150) for a Street View link, CAPCAD_GIS_GMAPS (colour 30) for a map link.
CAPCAD_GEO_LINK_WEBMAP Asks "Eixo ativo ou selecionar geometrias?" [active alignment or select geometry?], converts the geometry to WGS-84, turns every arc into 10 chords, writes leaflet.html in CapCad's Exports folder and opens it in the browser.
CAPCAD_GEO_STREETVIEW_IMAGE Two clicks (left edge → right edge) set the azimuth of the view; it returns the link of the Street View static image at that point in that direction. The first time it asks whether to open it in the browser or only copy it, and remembers the answer.
CAPCAD_GEO_IMAGERY_PICK Asks for the map type (Satellite, Roadmap, Terrain, Hybrid) and then, in a loop, inserts a georeferenced satellite image at every click. Esc ends.
CAPCAD_GEO_IMAGERY_VIEW The same, one single satellite image, at the centre of the current view, without asking for the type.
CAPCAD_GEO_IMAGERY_ALIGNMENT Strings satellite images along the alignment (or along a chosen polyline), sampled every 40 m; you give the range of samples to cover (1-250, for example) and a progress bar follows.
CAPCAD_GEO_HELP Only shows a text explaining the two approaches to background imagery — the Google Maps one (the image is saved in the project folder) and the Bing Maps / AutoCAD one (a native command, to be used locally only and redone on every screen change).

Every inserted image is downloaded into the project's exports folder, attached as a raster on layer CAPCAD_GEOIMAGE, centred on the point, sized by the zoom-18 scale and sent to the back of the display order. The command also sets the IMAGEFRAME variable to zero, so that the image frame does not show.

Workflow

Exporting the vertical signage to Google Earth

  1. Run CAPCAD_GEO_EXPORT. The form opens on the KMZ Vertical tab, with the project name in box 19.
  2. Tick the situations that should be included (20, 21, 22). With none ticked, the Situation frame turns red and a message asks you to choose.
  3. Choose how the sign appears (23 to 25) and the icon scale (26).
  4. Decide what to do with signs that have no picture in the library (27, 31 or 32).
  5. Click Generate KMZ (33) and select the signs in the drawing. When it finishes, the file path appears in box 38 and, if 36 is ticked, the KMZ opens.
  6. If a sign could not be exported, a text report lists the handle, the name and the reason for each.

Turning entities into text

  1. KML, GPX, JSON, CAD tab. Leave Entities to text (1) selected and choose the format (3 to 8).
  2. Click the action button (12) and select in the drawing. The form hides during the selection and comes back with the text in box 13.
  3. Changing the format after that reconverts the same selection at once.
  4. Save as… (17) writes to a file; Copy to clipboard (18) copies.

Bringing text into the drawing

  1. Select Text to entities (2) and choose the format.
  2. Paste the text into box 13 — or click one of the three samples (14, 15, 16), which set everything up for you.
  3. If you want a GeoJSON field to become the layer name, write its name in box 11.
  4. Tick Convert (9) if the text is in latitude-longitude and needs projecting; leave it unticked if the coordinates are already in the drawing's system.
  5. Click the action button (12). The form stays open after drawing.

The form

The numbers are unique on this page: 1 to 18 on tab 1, 19 to 41 on tab 2, 42 on tab 3.

Tab 1: KML, GPX, JSON, CAD

Entity to Geo Format, KML/GPX/JSON/CAD tab

Tab 1 with nothing selected: the content box shows "(no geometry selected)". The captures on this page are of a Portuguese session; the numbering is the same in both editions, and the tables give the English captions.

On the left, under the format list, the form carries the green note "Note: in pasting back scripts to CAD, dynamic input must be off (variable DYNMODE=0)".

# Control What it does
1 Entities to text Export direction. Box 13 becomes read-only and button 12 starts asking for the selection. Default.
2 Text to entities Import direction. Box 13 becomes editable and button 12 starts parsing whatever is in it.
3 KML Exports polylines as LineString in WGS-84. On import, it extracts the lines from the KML; loose points are not imported here — the form says how many were skipped and points at the GPS file converter.
4 GPX Exports as a track. On import, the same treatment for loose points.
5 GeoJSON Exports as GeoJSON; with Convert ticked, the coordinates come out in degrees. On import, each feature becomes an element, and the field named at 11 becomes the layer name.
6 EsriJSON The JSON format of ArcGIS services, in both directions.
7 CapJSON CapCad's own format, which preserves bulges and properties. Selected by default.
8 CAD Script Export only: it generates the text of a script that redraws the geometry. Importing is not possible — scripts are executed, not parsed; the form says so.
9 Convert Ticked, exporting converts from the system in box 10 into degrees, and importing converts from degrees into the drawing's system. Unticked, the coordinates pass through as they are. Ticked by default.
10 coord sys A blank item and UTM-18 to UTM-25. It is filled on opening with the project/alignment system and, failing that, with the last used in the session. Left blank, the import detects the zone from the coordinates themselves; the export, however, falls back to a fixed default — see Notes.
11 GeoJSON property to layer The name of the GeoJSON field whose value goes into each feature's layer name (GIS_LINE_<field>_<value>, GIS_POLYGON_…, GIS_POINTS_…). Blank, everything goes to CAPCAD_GEO_IMPORT.
12 Action button Runs the direction chosen at 1/2. Exporting, it hides the form, asks for a selection with no type filter and comes back with the text. Importing, it parses box 13, converts if required, draws, and keeps the form open.
13 Content box The text generated or to be pasted. Read-only in the export direction. With nothing selected it shows (no geometry selected).
14 Sample geojson points Selects Text to entities, unticks Convert, chooses GeoJSON, pastes a points sample and puts NOME in box 11.
15 Sample geojson polygons The same with a polygon, leaving box 11 empty.
16 Sample geojson lines The same with a line and NOME_LOGRAD in box 11.
17 Save as… Writes the content of box 13 to a file.
18 Copy to clipboard Copies the content of box 13.

On import with Convert ticked, the zone is decided like this: one possible zone and nothing chosen at 10 → it is adopted; one possible zone but another chosen → your choice wins; several possible zones and nothing chosen → the command warns and does not import. Along with the geometry, the set's bounding box comes in on layer CAPCAD_GIS_OSM_OUTPUT_EXTENTS.

Tab 2: KMZ Vertical

Entity to Geo Format, KMZ Vertical tab

Tab 2, with the defaults: deploy, icon + popup, scale 1.5, generic image.

# Control What it does
19 File name The KMZ's name, without extension. It comes filled with the project name. Invalid filename characters are stripped; empty, the command refuses.
20 Deploy Includes the signs to be installed. Ticked by default.
21 Keep Includes the signs to be kept.
22 Remove Includes the signs to be removed.
23 Icon + popup Each placemark gets the sign's icon and the balloon with the picture (fixed width 300). Default.
24 Icon only Only the icon.
25 Popup only Only the balloon.
26 Icon scale The icon's size multiplier in Google Earth. Default 1.5; a comma is accepted and swapped for a dot.
27 Plot one from the sign dwg Signs with no picture in the library should have one plotted from the sign's dwg. See Notes: today this behaves as Use the generic image.
28 ? (beside 27) Shows the warning that, for technical reasons, the sign will carry a white band.
29 keep it in the sign library (definitive) Only enabled with 27 ticked: the generated picture would be stored for reuse.
30 ? (beside 29) Shows that it would be saved under the same path and name as the sign's dwg, and could be reused.
31 Use the generic image Signs with no picture get generic.jpg. Default.
32 Skip the sign and list it in the report Signs with no picture do not enter the KMZ and appear in the final report.
33 Generate KMZ Asks for the sign selection (Select the signs to export), builds the KMZ and writes it into CapCad's Exports folder. With no situation ticked (20-22), the Situation frame turns red and the command does not run; with no active project it also does not run — and says nothing.
34 Create missing sign images Not available in this version: it shows a message saying so.
35 Open the proposed-signs folder Opens the project's proposed-signs folder in Explorer, when it is configured.
36 Open the KMZ when finished Opens the generated file in the default application. Ticked by default.
37 Show it in the folder Opens Explorer with the file selected.
38 Result path Filled at the end with the KMZ's full path (or the KML's, on tab 3). Informational only.
39 Show Opens the path from box 38 in Explorer.
40 Tutorial Opens the CapCad video about the KMZ.
41 Example project Asks first, downloads the sample drawing and alignment from the CapCad server, opens the drawing and points the project at the exports folder.

What the KMZ contains: one folder per situation (deploy / keep / remove), each with its own style; one placemark per sign, carrying the sign's name; each sign's picture inside the file, in the signs subfolder; and altitude 10 for signs belonging to a sign assembly, 1 for the rest. The file is assembled in CapCad's Exports\KML folder, zipped and renamed to .kmz. That folder is deleted and recreated on every run — do not keep anything in it.

Tab 3: KMZ Horizontal

Entity to Geo Format, KMZ Horizontal tab

Tab 3: one button, and the text explaining the flow.

# Control What it does
42 Generate KML Hides the form, asks for the marking selection, generates the dashes with their cadence applied (the same transformation the road markings use), converts to WGS-84, writes <name>-horizontal.kml in the exports folder and opens the file. The name comes from box 19 on tab 2; empty, the file is called horizontal-horizontal.kml.

Note that this tab's output is a KML, not a KMZ — there are no pictures to package.

How the options combine

The Google Maps link inherits the CAD view's zoom, in fixed steps over the view height (VIEWSIZE variable):

View height (drawing units) Link zoom
under 33 20
33 to 75 19
75 to 100 18
100 to 250 17
250 to 1,500 16
1,500 to 3,000 15
3,000 to 6,000 14
6,000 to 12,000 13
12,000 to 24,000 12
24,000 to 48,000 11
48,000 to 64,000 9
64,000 to 128,000 8
128,000 to 256,000 7
256,000 to 512,000 6
512,000 to 1,024,000 5
1,024,000 to 2,048,000 4
2,048,000 to 4,096,000 3
4,096,000 or more 1

Zoom 10 never comes out of this ladder; the difference is imperceptible in practice.

Satellite images, by contrast, always use zoom 18: 1,000 × 1,000 pixels, scale 0.345436287 drawing units per pixel — that is, a square about 345 m on a side, centred on the point. This holds for all three imagery commands.

Command Destination What stays in the drawing
CAPCAD_GEO_LINK_MAPS google.com/maps/@<lat>,<lon>,<zoom>z nothing
CAPCAD_GEO_LINK_STREETVIEW maps.google.com/maps?q=&layer=c&cbll=<lat>,<lon> POINT on CAPCAD_GIS_STREETVIEW
CAPCAD_GEO_STREETVIEW_IMAGE the Street View static image, with the azimuth of the two clicks nothing
CAPCAD_GEO_LINK_EARTH Exports\temp.kml, opened in the default application nothing
CAPCAD_GEO_LINK_MAPS_URL — (reads the clipboard) POINT on CAPCAD_GIS_GMAPS or CAPCAD_GIS_STREETVIEW
CAPCAD_GEO_LINK_WEBMAP Exports\leaflet.html, opened in the browser nothing
CAPCAD_GEO_IMAGERY_PICK / _VIEW / _ALIGNMENT raster on CAPCAD_GEOIMAGE, at the back

All of those that open an address also copy the link to the clipboard.

Remembered between sessions

The CAPCAD_GEO_EXPORT form keeps nearly everything: the format and direction radio buttons, the Convert box, the coordinate system, the layer property and every option on the KMZ Vertical tab. What is not kept is the content of the text box, the KMZ name and the result path. On closing, the chosen coordinate system also becomes the session's "last used", which the other GIS commands pick up.

CAPCAD_GEO_STREETVIEW_IMAGE keeps the "open in the browser or only copy" answer and does not ask again. The other link commands keep nothing.

Notes

  • Plot one from the sign dwg is not available in this version. The option behaves as Use the generic image, and the Create missing sign images button says so. The form carries that remark itself, at the foot of the tab.
  • The form opens on the KMZ Vertical tab, not on the first one. That is deliberate.
  • Not everything lands in the same folder. The KMZ Vertical and the web map's leaflet.html go into CapCad's Exports folder (beside the configuration file); the horizontal KML, Google Earth's temp.kml and the satellite images go into the project's exports folder, or into the Windows temporary folder when there is no project. Box 38 always shows the full path of the last result.
  • Some strings are English-only and some remain Portuguese. The action button's caption, the initial content of box 13, the When a sign has no image in the library frame title, the KMZ Vertical footer note and the import messages are English in every language; the web map's alignment-or-selection question is Portuguese in every language.
  • Leaving the coord sys box blank has different effects in the two directions. On import, it is what arms the automatic zone detection. On export, blank is not detected: the form falls back to UTM-22, which produces wrong coordinates anywhere outside that zone. Choose the system before exporting.
  • The selection happens on the button click, not when the command runs. Running CAPCAD_GEO_EXPORT again with the form open only brings it to the front — it does not ask for a new selection. This holds for AutoCAD; on the other four CADs the command asks for the selection right at the start, with a type filter (polylines, lines, arcs and circles) and the option of pressing Enter to import only.
  • The KMZ Vertical tab only works on AutoCAD. On the other four CADs the tab is drawn, but its export is not available in this version.
  • KML and GPX import lines only. Loose points are counted and skipped, with a message pointing at the GPS file converter (CAPCAD_GEO_CONVERT_DATA), which is what imports points.
  • CAPCAD_GEO_LINK_MAPS_URL reads the clipboard and asks for nothing. Copy the link in the browser before running the command; if the copied text is not a Google Maps or Street View link, the command shows what it found and ends.
  • CAPCAD_GEO_LINK_WEBMAP does not accept points, only curves: a web map of one isolated point would draw nothing.
  • Satellite imagery depends on the Google API and on the network. Each image is downloaded as a PNG into the exports folder, with the latitude and longitude in the filename; a download failure is reported on the command line and the loop carries on.
  • CAPCAD_GEO_IMAGERY_ALIGNMENT samples every 40 m and asks for the sample range (first-last). An answer with no hyphen ends the command without doing anything. Since each image covers about 345 m, the full range of a long alignment inserts many overlapping images — give a short range and repeat.
  • CAPCAD_GEO_HELP is Portuguese only — the text has no version in any other language, in any profile.
  • CAPCAD_GEO_STREETVIEW_IMAGE, CAPCAD_GEO_IMAGERY_VIEW and CAPCAD_GEO_IMAGERY_ALIGNMENT exist on AutoCAD only.