| 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 (all three tabs), 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 → draws a POINT on layer CAPCAD_GIS_EARTH (colour 92) and opens the point in Google Earth. With the Use the installed Google Earth, if any preference on (the default) and a Google Earth found on the machine, it is the installed one, through a temp.kml in the project's exports folder. Otherwise it is Google Earth on the web in the browser, with a pin on the point and the link copied; Google Earth picks the viewing distance itself. |
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 |
With an alignment in the project, asks Current alignment or select geometry on screen?; with none, goes straight to the selection. 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
- Run
CAPCAD_GEO_EXPORT. The form opens on the KMZ Vertical tab, with the project name in Name (19). - Tick the actions that should be included (20, 21, 22). With none ticked, the Actions frame turns light blue and a message asks you to select an option.
- Choose the KMZ style (23 to 25) and the icon scale (26).
- Decide what to do with signs whose picture is not found (27, 31 or 32).
- Click Convert vertical signs (33) and select the signs in the drawing. When it finishes, the file path appears in box 38; with 36 ticked the KMZ opens, and with 37 ticked Explorer shows it.
- If a sign could not be exported, a report titled Errors or issues found, report below: lists the handle, the name and the reason for each.
Turning entities into text
- KML, GPX, JSON, CAD tab. Leave Entities to text (1) selected and choose the format (3 to 8).
- 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.
- Changing the format after that reconverts the same selection at once.
- Save as… (17) writes to a file; Copy to clipboard (18) copies.
Bringing text into the drawing
- Select Text to entities (2) and choose the format.
- Paste the text into box 13 — or click one of the three samples (14, 15, 16), which set everything up for you.
- If you want a GeoJSON field to become the layer name, write its name in box 11.
- 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.
- 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, 43 and 44 on tab 2; 42, 45 and 46 on tab 3. The numbering is the same in every edition.
Tab 1: KML, GPX, JSON, CAD
Tab 1 with nothing selected: the content box shows "(no geometry selected)".
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
Tab 2, with the defaults: deploy, icon + popup, scale 1.2, convert signs to images, definitive.
| # | Control | What it does |
|---|---|---|
| 33 | Convert vertical signs | Asks for the sign selection, builds the KMZ and writes it into CapCad's Exports folder. With no action ticked (20 to 22), the Actions frame turns light blue, a message asks you to select an option and the command does not run. With no active project it also does not run. The coordinate system is the project's; when none is set, the command asks for one. |
| 19 | Name | The KMZ's name, without extension (.KMZ is shown beside it). It comes filled with the project name. Invalid filename characters are stripped; empty, the command refuses. |
| 37 | Show the KMZ in its folder when done | Opens Explorer with the file selected. Ticked by default. |
| 36 | Open the KMZ when done (Google Earth or similar required) | Opens the generated file in the default application. Ticked by default. |
| 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 the icon. |
| 25 | Popup | Only the balloon. |
| 26 | Icon scale | The icon's size multiplier in Google Earth. Default 1.2; a comma is accepted and swapped for a dot. |
The Sign images frame decides what happens to a sign whose picture is not found in the folder of its dwg, as its note says: Sign images must be in the same folder as the dwg. If not found:
| # | Control | What it does |
|---|---|---|
| 27 | Convert signs to images | A picture would be made from the sign's dwg. Default. See Notes: today the sign gets the generic image and is listed in the report. |
| 28 | ? (beside 27) | Shows the warning that, for technical reasons, the sign will carry a white band. |
| 43 | Definitive | With 27: the picture made would be kept for reuse. Default. |
| 44 | Temporary | With 27: the picture made would be used for this KMZ only. |
| 30 | ? (beside 43) | Shows that the picture would be saved under the same path and name as the sign's dwg, and could be reused. |
| 31 | Use generic | Signs with no picture get generic.jpg. |
| 32 | List only | Signs with no picture do not enter the KMZ and appear in the final report. |
| 34 | Generate images | Shows Coming soon. |
| 35 | Open folder | Opens the project's proposed-signs folder in Explorer, when it is configured. |
| 40 | Tutorial (red video icon) | Opens the CapCad video about the KMZ in a Portuguese interface; in any other interface language it shows Coming soon. |
| 41 | Example | Asks first, downloads the sample drawing and alignment from the CapCad server, opens the drawing and points the project at the exports folder. |
| 38 | Path | Filled at the end with the KMZ's full path. Informational only. |
| 39 | Show | Opens Explorer on the path in box 38. |
What the KMZ contains: one folder per action (deploy / keep / remove), each with its own style; one placemark per sign, carrying the sign's name, at altitude 1; and each sign's picture inside the file, in the signs subfolder. The file is assembled in CapCad's Exports\KML folder, zipped and renamed to .kmz. That folder is emptied on every run: do not keep anything in it.
Tab 3: KMZ Horizontal
Tab 3: one button and the result path.
| # | Control | What it does |
|---|---|---|
| 42 | Convert horizontal markings [beta] | Hides the form, asks for the marking selection, generates the dashes with their cadence applied (the same transformation the road markings use), converts them to WGS-84 from the system in box 10 of tab 1, writes horizontal.kml in CapCad's Exports folder and opens the file. With nothing usable selected, it says no data was found. |
| 45 | (result path) | Filled at the end with the KML's full path. Informational only. |
| 46 | Show | Opens Explorer on the path in box 45. |
Note that this tab's output is a KML, not a KMZ: there are no pictures to package.
How the options combine
The link's zoom and the image's scale
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.
What each link command produces
| 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 |
earth.google.com/web/search/<lat>,<lon>, or Exports\temp.kml in the installed Google Earth |
POINT on CAPCAD_GIS_EARTH |
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.
Two user preferences (CAPCAD_PREFERENCES) decide where a link opens. Use the installed Google Earth, if any (on by default) sends CAPCAD_GEO_LINK_EARTH to the Google Earth installed on the machine when one is found, and to Google Earth on the web otherwise. Open map links in a CapCad panel (off by default) opens Google Maps and Google Earth on the web in the CapCad Map panel inside the CAD, so every further click navigates the same panel, and sends Street View clicks to the Street View palette; off, each link opens a new browser tab.
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
- Convert signs to images is not available in this version. The option, and its Definitive / Temporary choice, behave as Use generic: a sign without a picture gets the generic image and is named in the final report. The Generate images button shows Coming soon.
- 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, the horizontal KML and the web map's
leaflet.htmlgo into CapCad'sExportsfolder (beside the configuration file); the satellite images go into the project's exports folder, or into the Windows temporary folder when there is no project. Box 38 shows the full path of the last KMZ, box 45 that of the last horizontal KML. - Some strings are English-only. Tab 1, the KMZ style frame, the Path and Show labels and the import messages are English 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 KMZ Horizontal tab uses the same box. - The selection happens on the button click, not when the command runs. Running
CAPCAD_GEO_EXPORTagain with the form open only brings it to the front; it does not ask for a new selection. - 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_URLreads 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_WEBMAPdoes 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_ALIGNMENTsamples 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_HELPis Portuguese only — the text has no version in any other language, in any profile.CAPCAD_GEO_STREETVIEW_IMAGE,CAPCAD_GEO_IMAGERY_VIEWandCAPCAD_GEO_IMAGERY_ALIGNMENTexist on AutoCAD only.


