Import Geometries in a WKT or Shape File

Import polygons, polylines or points in WKT (Wellknown Text) or Shapefile format geometries using an HTTP POST request, or import WKT geometries using HTTP GET. A layer can contain only one geometry type - polygons, polylines or points, but not a mix of different types. After the response there is a delay of several seconds to compile, store and make the geometries available in the service.

Resource methods and URI

GET/POST /2/layers/upload.json

Query Parameters

Parameters

Required?

Description

file

For GET request

For GET requests: URL-encoded WKT file content as parameter value. For POST requests: Instead of this parameter, a multipart/form-data body is sent. The filename of the multipart entity is arbitrary. The file can be a plain or zipped WKT text file ending with .wkt, or a zipped archive containing a .shp, .shx and .dbf file (optionally .prj or .cpg files). A WKT file consists of TAB separated elements. The first line contains the column names, the last column must be "wkt". The subsequent lines contain the content, the attributes and the geometry. Both Shapefiles and WKT files must use unprojected WGS84. To create an index on a set of columns for faster all.josn responses, append ;* to these column names.

app_id

Yes

A URL-safe encoded string obtained during the application registration. See Acquiring Credentials for information on getting credentials.

app_code

Yes

A URL-safe encoded string obtained during the application registration. See Acquiring Credentials for information on getting credentials.

layer_id

Yes

Layer the geometries are imported to.

level

No

Specify tile size for the database for performance optimization

storage

No

Either updatable or readonly. Default = updatable. If entries within a layer shall be modified later on, 'updatable' must be chosen. If the layer will always get replaced by full layer uploads, then readonly can be chosen. For readonly, larger data sets can be uploaded and the performance can be superior.