Analyze (Truncation Report)
POST/api/geoconvert/convert/analyze
Pre-flight data-loss report for a GeoJSON → Shapefile conversion. The Shapefile/DBF format silently truncates field names to 10 characters and string values to 254, drops fields that collide after truncation, and stores a single geometry family per file. This endpoint scans the GeoJSON and reports exactly what would be lost — without converting or charging — so you can warn (or block) before committing.
A shapefile (or other lossless-direction) upload returns a report with applicable: false.
The same report is also bundled in the /convert/file and /convert/upload responses (as truncationReport) — so use this endpoint only when you want the report before converting (and before it counts against your allowance).
Headers
X-API-Key(required for authentication)
Request (multipart/form-data)
file file (required)
A GeoJSON document (.geojson or .json).
Response 200
success boolean
True when the file was accepted and analyzed.
report.applicable boolean
True only for the GeoJSON → Shapefile direction; false otherwise.
report.hasWarnings boolean
True if anything noteworthy was found (includes cosmetic field renames).
report.hasDataLoss boolean
True only when data would actually be lost: name collisions, value truncation, or dropped geometries. Use this to decide whether to block-and-warn.
report.fieldNameTruncations array
Field names over 10 chars that will be shortened: { original, truncated }. A rename only — no data lost.
report.fieldNameCollisions array
Distinct fields that collapse to the same 10-char name: { truncatedName, fields[] }. A real loss.
report.valueTruncations array
String fields whose longest value exceeds 254 chars: { field, maxLength, limit, affectedFeatures }.
report.geometryCoercions array
Geometry-level losses: { issue, types[], detail } (mixed geometry families or GeometryCollection).
report.summary object
Counts: fieldsTruncated, fieldNameCollisions, fieldsWithValueTruncation, geometryIssues.
curl -X POST https://cadshift.com/api/geoconvert/convert/analyze -H "X-API-Key: $API_KEY" -F "[email protected]"{
"success": true,
"report": {
"applicable": true,
"hasWarnings": true,
"hasDataLoss": true,
"featureCount": 1240,
"fieldNameTruncations": [
{ "original": "population_density", "truncated": "population" }
],
"fieldNameCollisions": [
{ "truncatedName": "population", "fields": ["population_density", "population_count"] }
],
"valueTruncations": [
{ "field": "description", "maxLength": 612, "limit": 254, "affectedFeatures": 3 }
],
"geometryCoercions": [
{ "issue": "mixed_geometry_families", "types": ["LineString", "Point"],
"detail": "A Shapefile stores a single geometry type; features of other geometry types will be dropped during conversion." }
],
"summary": {
"fieldsTruncated": 1,
"fieldNameCollisions": 1,
"fieldsWithValueTruncation": 1,
"geometryIssues": 1
}
}
}