1.27. 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 “Format” field select data format you need: CSV, DXF, ESRI Shapefile, GeoJSON or Mapinfo File:

../../_images/formats_en_2.png

Pic. 1.100. “Format” field

In “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 below):

../../_images/coordinate_systems_en_2.png

Pic. 1.101. “SRS” field

In “Encoding” field you can choose among UTF-8, Windows-1251, Windows-1252 encoding for your data:

../../_images/encodings_en_2.png

Pic. 1.102. “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”).

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.png

Pic. 1.103. Selcting fields

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.

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

1.27.1. Custom coordinate systems

Note

Custom SRS functionality is available on Premium and while using the product On-premise.

Note

Only users with administrative privileges can add and modify SRS.

You can import a SRS from the catalog or create your own.

To import SRS from the catalog open “Control panel” in the main menu and press “Catalog” in “Spacial reference systems”. Start typing the name of the SRS in the search bar. When you find the desired SRS in the search results, press the icon with the arrow next to it.

../../_images/new_srs_catalog_en.png

Pic. 1.104. Search results in the catalog

You will be redirected to the import page. Here you can modify the name of SRS to be displayed in your WebGIS.

../../_images/new_srs_import_en.png

Pic. 1.105. Adding SRS from catalog

../../_images/new_srs_import_save_en.png

Pic. 1.106. Completing import

On the next page, press Save to complete the import.

To create a new SRS open “Control panel” in the main menu and press “Create” in “Spatial reference systems”:

../../_images/new_srs_eng_2.png

Pic. 1.107. Creation of a new SRS

You can give an SRS display name and enter its definition in OGC WKT format. You can also import definitions from common formats as PROJ, MapInfo and EPSG, after the import they will get converted to OGC WKT format. Then press “Create” button.

You can find a list of created and available SRS in the “List” of “Spatial reference systems” in “Control panel”. In this list there are two SRS by default: «WGS 84 / Lon-lat (EPSG:4326)» and «WGS 84 / Pseudo-Mercator (EPSG:3857)», which can’t be removed or edited (except name):

../../_images/list_srs_eng_2.png

Pic. 1.108. A list of SRS

The added SRS can be used for various purposes:

  1. To capture coordinates on Web maps. If you have set up additional SRS (one or several), you can now conveniently capture coordinates in this SRS from anywhere on the map:

../../_images/use_of_custom_srs1_eng.png

Pic. 1.109. The use of custom SRS

  1. To export vector layers. All custom SRS are also available for data export (see above).

  2. To extend API requests. Support for custom SRS is gradually added to NextGIS Web API too. For example, this request will return a feature in a required SRS:

    /api/resource/{id}/feature/{fid}?srs=990002

Custom SRS identifier (990002 in this example) can be known by editing a created SRS, for example:

/srs/990002/edit

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.