API Utilities
Convert to WKT
Allows the conversion of .KML, .KMZ or shapefiles into WKT (EPSG 4326), which are necessary for the registration of a field.
Content-Type: multipart/form-data
POST /api/utils/towkt
In the form include each file under the name:
files[]
:file
, file.
Example from POSTMAN with shapefiles:
In case of a KML or KMZ file, only one file is sent.
Response example:
{
"data":{
"code": 1,
"envelope": [-59.9799656867981, -59.9682283401489, -35.8329711461622, -35.8241463744063],
"feature": "POLYGON ((-59.9799656867981 -35.8329711461622,-59.9799656867981 -35.8241463744063,-59.9682283401489 -35.8241463744063,-59.9682283401489 -35.8329711461622,-59.9799656867981 -35.8329711461622))"
}
}
Specific errors
code | description |
---|---|
2 | There is more than 1 polygon in the file. Currently, geometries of type MULTIPOLYGON are not allowed. |
3 | No polygons in the file |
4 | The geometry is not of POLYGON type |
IMPORTANT: In case of receiving invalid files, the response will have a status code HTTP 400 and its body will not have an error code