KufCad

GIS import / export

Ribbon: GIS ▸ Data ▸ Import / Export / Map ExportCommand: IMPORTGIS, EXPORTGIS, MAPEXPORTAlias: MAPIMPORT, GEOIMPORT, GEOEXPORT

The Data panel of the GIS tab exchanges vector data with GIS software (QGIS, Google Earth, GPS…). All three buttons open the operating system's file dialog.

The Data panel
Figure 12.15 — The Data panel: Import 8 · Export 9 · Map Export 10.

Import (IMPORTGIS)

Click Import (or IMPORTGIS) and choose a .geojson, .json, .kml, .gpx or .shp (see Shapefile) file. KufCad converts the latitude / longitude to drawing coordinates and draws:

GIS dataBecomes
PointPoint
LineStringOpen Polyline
PolygonClosed Polyline
  • If the drawing is not located, the origin (0,0) is set at the centre of the data and the command line says drawing wasn't georeferenced — origin set to data centre.
  • The result is reported as MAPIMPORT: file_name → N point(s), N line(s), N polygon(s). and the drawing zooms to the data.

Export (EXPORTGIS / MAPEXPORT)

The drawing must be located first (MAPEXPORT: georeference the drawing first). Click Export or Map Export and name the file: a .geojson extension writes GeoJSON, .kml writes KML, .shp writes a Shapefile. The drawing's Point, Line and Polyline objects are converted from drawing coordinates back to latitude / longitude.

Shapefile (SHP)

Import: pick a .shp file in the Import dialog. KufCad also reads the .prj file with the same name (the coordinate system). The .dbf attribute table is not kept on the objects yet (as with GeoJSON / KML import). Point, MultiPoint, PolyLine, Polygon and their Z / M variants are read (elevation is dropped). Each part of a line becomes an open Polyline and each ring of a polygon (holes included) a closed Polyline.

  • .prj is GEOGCS (latitude / longitude, e.g. WGS 84): imported like GeoJSON — converted to drawing coordinates through the georeference.
  • .prj is PROJCS (a projected system in metres, e.g. VN-2000 / UTM): KufCad does not reproject yet, so the coordinates are imported as is in drawing units; the command line reports projected coordinates … imported as drawing units without reprojection.

Export: in the Export dialog choose the Shapefile type (.shp). A Shapefile holds a single geometry type, so when the drawing has several KufCad writes one set per type: name_point.shp, name_line.shp, name_polygon.shp (a single type keeps the name). Each set has .shp, .shx, .dbf (ID, NAME columns — NAME left empty), .prj (WGS 84) and .cpg (UTF-8, keeps accented names).

Sample set to try: docs/manual/samples/hoan_kiem_*.shp (a lake with an island, a street, two points).

The file dialogs belong to the operating system so this guide has no pictures of them; the GIS Basemap panel also has Import… / Export… buttons that do the same thing (see Basemap).