{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "report.schema.json", "title": "Report", "description": "The output from running copcc (or generateReport)", "type": "object", "properties": { "name": { "type": "string", "description": "Path to scanned file, or a Report Title if provided at scan execution" }, "scan": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of scan executed", "pattern": "^(shallow|deep|custom)(-[0-9]+/[0-9]+)?$" }, "filetype": { "type": "string", "description": "Level of information retrieved via copc.js", "enum": ["COPC", "LAS", "Unknown"] }, "start": { "type": "string", "description": "new Date() at start of scan execution", "format": "date-time" }, "end": { "type": "string", "description": "new Date() at end of scan execution", "format": "date-time" }, "time": { "type": "number", "description": "Scan time in milliseconds" } }, "required": ["type", "filetype", "start", "end", "time"], "additionalProperties": false }, "checks": { "type": "array", "description": "List of all checks attempted on the file", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Property name of Check Function in Suite" }, "description": { "type": "string", "description": "Human readable description of what Check Function is doing" }, "status": { "type": "string", "description": "Status on if data is valid according to specifications", "enum": ["pass", "fail", "warn"] }, "info": { "type": "string", "description": "Additional information about the performed check" } }, "required": ["id", "status", "description"], "additionalProperties": false } } }, "required": ["name", "scan", "checks"], "anyOf": [ { "if": { "properties": { "scan": { "properties": { "filetype": { "const": "COPC" } }, "required": ["filetype"] } }, "required": ["scan"] }, "then": { "properties": { "copc": { "type": "object", "properties": { "header": { "type": "object", "properties": { "fileSignature": { "const": "LASF" }, "fileSourceId": { "type": "integer" }, "globalEncoding": { "type": "integer" }, "projectId": { "type": "string" }, "majorVersion": { "type": "integer" }, "minorVersion": { "type": "integer" }, "systemIdentifier": { "type": "string" }, "generatingSoftware": { "type": "string" }, "fileCreationDayOfYear": { "type": "integer" }, "fileCreationYear": { "type": "integer" }, "headerLength": { "type": "integer" }, "pointDataOffset": { "type": "integer" }, "vlrCount": { "type": "integer" }, "pointDataRecordFormat": { "type": "integer" }, "pointDataRecordLength": { "type": "integer" }, "pointCount": { "type": "integer" }, "pointCountByReturn": { "type": "array", "items": { "type": "integer" }, "minItems": 5, "maxItems": 15 }, "scale": { "type": "array", "items": { "type": "number" }, "minItems": 3, "maxItems": 3 }, "offset": { "type": "array", "items": { "type": "number" }, "minItems": 3, "maxItems": 3 }, "min": { "type": "array", "items": { "type": "number" }, "minItems": 3, "maxItems": 3 }, "max": { "type": "array", "items": { "type": "number" }, "minItems": 3, "maxItems": 3 }, "waveformDataOffset": { "type": "integer" }, "evlrOffset": { "type": "integer" }, "evlrCount": { "type": "integer" } }, "required": [ "fileSignature", "fileSourceId", "globalEncoding", "projectId", "majorVersion", "minorVersion", "systemIdentifier", "generatingSoftware", "fileCreationDayOfYear", "fileCreationYear", "headerLength", "pointDataOffset", "vlrCount", "pointDataRecordFormat", "pointDataRecordLength", "pointCount", "pointCountByReturn", "scale", "offset", "min", "max", "waveformDataOffset", "evlrOffset", "evlrCount" ] }, "vlrs": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "recordId": { "type": "integer" }, "contentOffset": { "type": "integer" }, "contentLength": { "type": "integer" }, "description": { "type": "string" }, "isExtended": { "type": "boolean" } }, "required": [ "userId", "recordId", "contentOffset", "contentLength", "description", "isExtended" ], "additionalProperties": false } }, "info": { "type": "object", "properties": { "cube": { "type": "array", "items": { "type": "number" }, "minItems": 6, "maxItems": 6 }, "spacing": { "type": "number" }, "rootHierarchyPage": { "type": "object", "properties": { "pageOffset": { "type": "integer" }, "pageLength": { "type": "integer" } }, "required": ["pageOffset", "pageLength"], "additionalProperties": false }, "gpsTimeRange": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 2 } }, "required": [ "cube", "spacing", "rootHierarchyPage", "gpsTimeRange" ], "additionalProperties": false }, "eb": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "type": { "enum": ["signed", "unsigned", "float"] }, "length": { "type": "integer" }, "nodata": { "type": "number" }, "min": { "type": "number" }, "max": { "type": "number" }, "scale": { "type": "number" }, "offset": { "type": "number" } }, "required": ["name", "description", "length"], "additionalProperties": false } }, "wkt": { "type": "string" } }, "required": ["header", "vlrs", "info", "eb"], "additionalProperties": false }, "pdal": { "type": "object", "properties": { "metadata": { "type": "object", "properties": { "comp_spacialreference": { "type": "string" }, "copc": { "type": "boolean" }, "count": { "type": "integer" }, "creation_doy": { "type": "integer" }, "creation_year": { "type": "integer" }, "dataformat_id": { "type": "integer" }, "dataoffset": { "type": "integer" }, "filesource_id": { "type": "integer" }, "global_encoding": { "type": "integer" }, "global_encoding_base64": { "type": "string" }, "gtiff": { "type": "string" }, "header_size": { "type": "integer" }, "major_version": { "type": "integer" }, "maxx": { "type": "number" }, "maxy": { "type": "number" }, "maxz": { "type": "number" }, "minor_version": { "type": "integer" }, "minx": { "type": "number" }, "miny": { "type": "number" }, "minz": { "type": "number" }, "offset_x": { "type": "number" }, "offset_y": { "type": "number" }, "offset_z": { "type": "number" }, "point_length": { "type": "integer" }, "project_id": { "type": "string" }, "scale_x": { "type": "number" }, "scale_y": { "type": "number" }, "scale_z": { "type": "number" }, "software_id": { "type": "string" }, "spacial_reference": { "type": "string" }, "srs": { "type": "object", "properties": { "compoundwkt": { "type": "string" }, "horizontal": { "type": "string" }, "isgeocentric": { "type": "boolean" }, "isgeographic": { "type": "boolean" }, "json": { "type": "string" }, "prettycompoundwkt": { "type": "string" }, "prettywkt": { "type": "string" }, "proj4": { "type": "string" }, "units": { "type": "object", "properties": { "horizontal": { "type": "string" }, "vertical": { "type": "string" } }, "required": ["horizontal", "vertical"] }, "vertical": { "type": "string" }, "wkt": { "type": "string" } }, "required": [ "compoundwkt", "horizontal", "isgeocentric", "isgeographic", "json", "prettycompoundwkt", "prettywkt", "proj4", "units", "vertical", "wkt" ] }, "system_id": { "type": "string" } }, "patternProperties": { "^vlr_[0-9]+$": { "type": "object", "properties": { "data": { "type": "string" }, "description": { "type": "string" }, "record_id": { "type": "integer" }, "user_id": { "type": "string" } }, "required": ["data", "description", "record_id", "user_id"] } }, "required": [ "comp_spacialreference", "copc", "count", "creation_doy", "creation_year", "dataformat_id", "dataoffset", "filesource_id", "global_encoding", "global_encoding_base64", "header_size", "major_version", "maxx", "maxy", "maxz", "minor_version", "minx", "miny", "minz", "offset_x", "offset_y", "offset_z", "point_length", "project_id", "scale_x", "scale_y", "scale_z", "software_id", "spacial_reference", "system_id" ], "if": { "properties": { "copc": { "const": true } } }, "then": { "properties": { "copc_info": { "type": "object", "properties": { "center_x": { "type": "number" }, "center_y": { "type": "number" }, "center_z": { "type": "number" }, "gpstime_maximum": { "type": "number" }, "gpstime_minimum": { "type": "number" }, "halfsize": { "type": "number" }, "root_hier_offset": { "type": "integer" }, "root_hier_size": { "type": "integer" }, "spacing": { "type": "number" } }, "required": [ "center_x", "center_y", "center_z", "gpstime_maximum", "gpstime_minimum", "halfsize", "root_hier_offset", "root_hier_size", "spacing" ] } }, "required": ["copc_info"] }, "additionalProperties": false } }, "required": ["metadata"], "additionalProperties": false } }, "additionalProperties": false } }, { "if": { "properties": { "scan": { "properties": { "filetype": { "const": "LAS" } }, "required": ["filetype"] } }, "required": ["scan"] }, "then": { "properties": { "las": { "type": "object", "properties": { "header": { "type": "object", "properties": { "fileSignature": { "const": "LASF" }, "fileSourceId": { "type": "integer" }, "globalEncoding": { "type": "integer" }, "projectId": { "type": "string" }, "majorVersion": { "type": "integer" }, "minorVersion": { "type": "integer" }, "systemIdentifier": { "type": "string" }, "generatingSoftware": { "type": "string" }, "fileCreationDayOfYear": { "type": "integer" }, "fileCreationYear": { "type": "integer" }, "headerLength": { "type": "integer" }, "pointDataOffset": { "type": "integer" }, "vlrCount": { "type": "integer" }, "pointDataRecordFormat": { "type": "integer" }, "pointDataRecordLength": { "type": "integer" }, "pointCount": { "type": "integer" }, "pointCountByReturn": { "type": "array", "items": { "type": "integer" }, "minItems": 5, "maxItems": 15 }, "scale": { "type": "array", "items": { "type": "number" }, "minItems": 3, "maxItems": 3 }, "offset": { "type": "array", "items": { "type": "number" }, "minItems": 3, "maxItems": 3 }, "min": { "type": "array", "items": { "type": "number" }, "minItems": 3, "maxItems": 3 }, "max": { "type": "array", "items": { "type": "number" }, "minItems": 3, "maxItems": 3 }, "waveformDataOffset": { "type": "integer" }, "evlrOffset": { "type": "integer" }, "evlrCount": { "type": "integer" } }, "required": [ "fileSignature", "fileSourceId", "globalEncoding", "projectId", "majorVersion", "minorVersion", "systemIdentifier", "generatingSoftware", "fileCreationDayOfYear", "fileCreationYear", "headerLength", "pointDataOffset", "vlrCount", "pointDataRecordFormat", "pointDataRecordLength", "pointCount", "pointCountByReturn", "scale", "offset", "min", "max", "waveformDataOffset", "evlrOffset", "evlrCount" ] }, "vlrs": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "recordId": { "type": "integer" }, "contentOffset": { "type": "integer" }, "contentLength": { "type": "integer" }, "description": { "type": "string" }, "isExtended": { "type": "boolean" } }, "required": [ "userId", "recordId", "contentOffset", "contentLength", "description", "isExtended" ], "additionalProperties": false } } } }, "error": { "type": "object", "properties": { "message": { "type": "string" }, "stack": { "type": "string" } }, "required": ["message"] }, "pdal": { "type": "object", "properties": { "metadata": { "type": "object", "properties": { "comp_spacialreference": { "type": "string" }, "copc": { "type": "boolean" }, "count": { "type": "integer" }, "creation_doy": { "type": "integer" }, "creation_year": { "type": "integer" }, "dataformat_id": { "type": "integer" }, "dataoffset": { "type": "integer" }, "filesource_id": { "type": "integer" }, "global_encoding": { "type": "integer" }, "global_encoding_base64": { "type": "string" }, "gtiff": { "type": "string" }, "header_size": { "type": "integer" }, "major_version": { "type": "integer" }, "maxx": { "type": "number" }, "maxy": { "type": "number" }, "maxz": { "type": "number" }, "minor_version": { "type": "integer" }, "minx": { "type": "number" }, "miny": { "type": "number" }, "minz": { "type": "number" }, "offset_x": { "type": "number" }, "offset_y": { "type": "number" }, "offset_z": { "type": "number" }, "point_length": { "type": "integer" }, "project_id": { "type": "string" }, "scale_x": { "type": "number" }, "scale_y": { "type": "number" }, "scale_z": { "type": "number" }, "software_id": { "type": "string" }, "spacial_reference": { "type": "string" }, "srs": { "type": "object", "properties": { "compoundwkt": { "type": "string" }, "horizontal": { "type": "string" }, "isgeocentric": { "type": "boolean" }, "isgeographic": { "type": "boolean" }, "json": { "type": "string" }, "prettycompoundwkt": { "type": "string" }, "prettywkt": { "type": "string" }, "proj4": { "type": "string" }, "units": { "type": "object", "properties": { "horizontal": { "type": "string" }, "vertical": { "type": "string" } }, "required": ["horizontal", "vertical"] }, "vertical": { "type": "string" }, "wkt": { "type": "string" } }, "required": [ "compoundwkt", "horizontal", "isgeocentric", "isgeographic", "json", "prettycompoundwkt", "prettywkt", "proj4", "units", "vertical", "wkt" ] }, "system_id": { "type": "string" } }, "patternProperties": { "^vlr_[0-9]+$": { "type": "object", "properties": { "data": { "type": "string" }, "description": { "type": "string" }, "record_id": { "type": "integer" }, "user_id": { "type": "string" } }, "required": ["data", "description", "record_id", "user_id"] } }, "required": [ "comp_spacialreference", "copc", "count", "creation_doy", "creation_year", "dataformat_id", "dataoffset", "filesource_id", "global_encoding", "global_encoding_base64", "header_size", "major_version", "maxx", "maxy", "maxz", "minor_version", "minx", "miny", "minz", "offset_x", "offset_y", "offset_z", "point_length", "project_id", "scale_x", "scale_y", "scale_z", "software_id", "spacial_reference", "system_id" ], "if": { "properties": { "copc": { "const": true } } }, "then": { "properties": { "copc_info": { "type": "object", "properties": { "center_x": { "type": "number" }, "center_y": { "type": "number" }, "center_z": { "type": "number" }, "gpstime_maximum": { "type": "number" }, "gpstime_minimum": { "type": "number" }, "halfsize": { "type": "number" }, "root_hier_offset": { "type": "integer" }, "root_hier_size": { "type": "integer" }, "spacing": { "type": "number" } }, "required": [ "center_x", "center_y", "center_z", "gpstime_maximum", "gpstime_minimum", "halfsize", "root_hier_offset", "root_hier_size", "spacing" ] } }, "required": ["copc_info"] }, "additionalProperties": false } }, "required": ["metadata"], "additionalProperties": false } }, "additionalProperties": false } }, { "if": { "properties": { "scan": { "properties": { "filetype": { "const": "Unknown" } }, "required": ["filetype"] } }, "required": ["scan"] }, "then": { "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "stack": { "type": "string" } }, "required": ["message"] }, "copcError": { "type": "object", "properties": { "message": { "type": "string" }, "stack": { "type": "string" } }, "required": ["message"] } }, "required": ["error"], "additionalProperties": false } } ] }