1.17. How to export data¶
Web GIS allows to export data from Vector layers and PostGIS layer in GeoJSON, CSV, ESRI Shape, AutoCAD DXF and Mapinfo TAB formats. Depending on a format, additional file components are exported making further use of exported data more convenient. For example CSVT (field structure description) and PRJ (coordinate system description) are added to CSV and CPG (codepage) to ESRI Shape.
To export data:
Open the Properties page of Vector layer or PostGIS layer from which you want to export data;
Select admin console;on the right side of Web GIS
Save file in chosen format to your device.
In “Format” field select data format you need: CSV, DXF, ESRI Shapefile, GeoJSON or Mapinfo File:
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):
In “Encoding” field you can choose among UTF-8, Windows-1251, Windows-1252 encoding for your data:
“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”).
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:
1.17.1. Custom coordinate systems¶
Only userswith administrative privileges can add and modify SRS.
To add a new SRS open “Control panel” (see item 1 in Pic. 4.2.) and press “Create” in “Spatial reference systems”:
You can give an SRS display name and 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):
The added SRS can be used for various purposes:
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:
To export vector layers. All custom SRS are also available for data export (see above).
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:
Custom SRS identifier (990002 in this example) can be known by editing a created SRS, for example:
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.
You can also export data from Vector layers with desktop app NextGIS QGIS.