Skip to content

Retrieve Geometry

Retrieve Geometry API allows a user to retrieve a previously stored geometry.

Request

Endpoint

GET /v4/{billing_plan}/account/{account_id}/geometry/wkt/{geometry_id}

Path Parameters

Name                       Description Type Examples
*{billing_plan} Billing plan to be applied to the call. string ondemand
*{account_id} Provided identifier of the account. string

Header Parameters

Name                          Description Type Examples                         
*x-api-key Provided API key {x_api_key} that allows authentication. string
*Authorization Provided token {jwt_bearer} that allows authorization. string Bearer {jwt_bearer}

Query Parameters

Name        Description Type Examples
simplify_points Simplify the polygon(s) by providing the desired number of points that represent the polygon(s)..
The number of points of the returned polygon(s) may slightly differ from the requested one due to an approximation tolerance threshold.
The returned polygon(s) will be simplified using Ramer-Douglas-Peucker algorithm.
int 176
Example
curl -X GET 'https://api.datappeal.io/v4/ondemand/account/{account_id}/geometry/wkt/379c730942e570d586a5520770c0a65d?simplify_points=176' \
-H 'x-api-key: {x_api_key}' \
-H 'Authorization: Bearer {jwt_bearer}' \

Body

SavedGeometry

Field Description Type Examples
*id Geometry hashed identifier. string 379c730942e570d586a5520770c0a65d
4442852e86f5ef4cf241a43bac90a6dcfh
*geometry Geometry in WKT format. string POLYGON((10.614595 43.833381, 10.96118 43.850282, 11.172152 44.178572, 11.455479 43.889604, 11.952009 43.904757, 11.491356 43.622749, 11.815152 43.347745, 11.222191 43.505484, 10.84784 43.311439, 10.948434 43.641572, 10.614595 43.833381))
*name Description of the geometry. string Florence Star
*simplification Simplification level of geometry. string None
PreserveTopology
Simple
Possible values for simplification

The returned polygon(s) will be valid in any case.
Depending on the value of the optional parameter simplify_points, the simplification field may assume the following values:

  • None: if simplify_points is not set or is set to a value high enough not to require any simplification.
  • PreserveTopology: if simplify_points is set to a value not high enough to avoid any simplification, but high enough to preserve original topology.
  • Simple: if simplify_points is set to a value not high enough to avoid simplification, nor to preserve original topology.
Example
{
    "id": "379c730942e570d586a5520770c0a65d",
    "geometry": "POLYGON((10.614595 43.833381, 10.96118  43.850282, 11.172152 44.178572, 11.455479 43.889604, 11.952009 43.904757, 11.491356 43.622749, 11.815152 43.347745, 11.222191 43.505484, 10.84784  43.311439, 10.948434 43.641572, 10.614595 43.833381))",
    "name": "Florence Star",
    "simplification": "PreserveTopology"
}