1.29. How to export data

Web GIS allows to export data from Vector layers and PostGIS layer in the following formats:

Depending on the format, additional file components are exported making further use of the exported data more convenient. For example CSVT (field structure description) and PRJ (coordinate system description) are added to CSV and CPG (codepage) to ESRI Shapefile.

To export data:

  1. Open the Properties page of Vector layer or PostGIS layer from which you want to export data;

  2. Select Vector layer ‣ Save as on the right side of Web GIS admin console;

  3. Save file in chosen format to your device.

In the Format field select data format you need:

../../_images/formats_en_3.png

Pic. 1.116. “Format” field

In the SRS field (Spatial reference system) in addition to standart coordinate systems Longitude-Latitude (EPSG: 4326) amd Mercator (EPSG: 3857) you can select custom coordinate systems created earlier (how to add custom SRS see this page):

../../_images/coordinate_systems_en_3.png

Pic. 1.117. “SRS” field

In the Encoding field you can choose UTF-8, Windows-1251, or Windows-1252 encoding for your data:

../../_images/encodings_en_3.png

Pic. 1.118. “Encoding” field

FID field is used for setting a field name to be added to a exported data where the object identifiers will be placed (the default is “ngw_id”).

You can choose to use field display names instead of keynames. Keynames are technical and use only plain latin symbols. Display names can be in any language, usually they are seen as column headers or field labels in a form.

../../_images/key_field_name_en.png

Pic. 1.119. Display name with superscript symbol and keyname of the field

Next you can chose which of the fields of the data to keep in the file. By default, all are selected. To remove a field, click on the cross by its name or untick it in the drop-down menu. To add a field again, tick it in the drop-down menu.

../../_images/export_fields_en_2.png

Pic. 1.120. Selcting fields

If you need to export only the features within a particular area, you can Limit by extent. The extent is set in degrees.

A text filter is also available. Search is performed in all fields that don’t have text search disabled, just like in the feature table.

Output in ESRI Shapefile or MapInfo TAB results in a Zip archive with necessary files. For single-file formats (like GeoJSON or CSV) creation of Zip archive is optional.

../../_images/zip_option_en.png

Pic. 1.121. Creation of Zip archive selected for GeoJSON format

All export options are available through HTTP API.

For example, this inquiry will get you data in CSV format, EPSG:4326, UTF-8 encoding, zipped:

https://demo.nextgis.com/api/resource/4077/export?format=csv&srs=4326&zipped=true&fid=ngw_id&encoding=UTF-8

Note

Geometry and attributes data export is supported. Features’ descriptions, metadata and images can’t be exported in the described way but can be requested using NextGIS API.

Note

You can also export data from Vector layers with desktop app NextGIS QGIS.