Basic vector GIS

Exporting layers and selected features

Save layers, selected features and summary tables as GeoJSON, GeoPackage, Shapefile, CSV, KML or GPX, and rasters as GeoTIFF or ASCII Grid, with the CRS you choose.

Beginner2 min read

You will learn

  • Export a layer in the format you need.
  • Export only the selected features and chosen fields.
  • Change the CRS on export and understand the export check.

Prerequisites

Data for this tutorial

Wards (synthetic) Download wards.geojson

Format
GeoJSON
Geometry
Polygon
CRS
EPSG:32643 (WGS 84 / UTM zone 43N)
Content
84 wards (31 peri-urban, 19 rural, 34 urban), 333,497 residents
In Orbis
Browser panel ▸ Tutorial sample data (synthetic) ▸ Wards, or Load complete tutorial pack.
Fields used in the tutorials
FieldTypeDescription
ward_idtextWard code W01 to W84.
ward_nametextWard name.
zonetexturban, peri-urban or rural.
populationintegerResidents.
householdsintegerHouseholds.
area_km2realEllipsoidal area in km².
density_km2realPersons per km².
literacy_raterealLiterate share, per cent.

Licence: CC0 1.0. All tutorial data is synthetic and generated by Orbis. About the datasets

The task

You want to give your results to someone else or open them in other software. You will export the urban wards as a GeoPackage and the whole layer as CSV.

Steps

  1. Add Wards and select the urban wards (see Selecting features using attribute conditions).

    Here, select the 34 urban wards with Select by attribute (zone = urban).

  1. Right-click Wards (synthetic) and choose Export… (or Layer ▸ Export layer…, or Export… in the attribute table toolbar).
  1. In the Export dialog:

    • Format: GeoPackage. Also available: GeoJSON, ESRI Shapefile (ZIP), CSV (with WKT or X/Y), KML and GPX (always WGS 84).
    • Output CRS: leave the layer CRS, or choose another one to transform the coordinates.
    • Tick Selected features only.
    • Attributes: untick fields you do not need.
    • File name: type a name; the extension follows the format.
    The Export dialog with GeoPackage, the output CRS, Selected features only and the list of attributes
    The Export dialog.
  1. Click Export. Orbis writes the file in a background worker and then reads it back to check the number of records, the fields, the coordinates and the CRS. Only a file that passes the check is downloaded; the notification says "read back and verified".
  1. Export again as CSV, with Geometry columns set to WKT column, without ticking Selected features only.

Expected result

You have Wards (synthetic).gpkg with the 34 urban wards in EPSG:32643, and a CSV file with all 84 wards and a WKT geometry column. Both open in QGIS, ArcGIS, GDAL or a spreadsheet.

Common mistakes

  • Shapefile field names. Shapefiles allow 10 characters per field name; longer names are shortened and the export reports the new names. GeoPackage keeps them.
  • GeoJSON in a projected CRS. Standard GeoJSON is WGS 84. Other CRSs are written with a legacy crs member that some programs ignore.
  • Forgetting Selected features only. Without it the whole layer is exported.

Troubleshooting

  • The export fails verification. The message says what did not match. Report it; Orbis does not hand over a file it could not read back.
  • I need a raster file. For rasters the dialog offers GeoTIFF, ESRI ASCII Grid (one band, with a .prj, in a ZIP), a CSV pixel table and a PNG picture (not georeferenced).