- Source:
Members
(inner) CreateDataset
Create new datasets with custom attributes and restrictions.
Also supports manual attribute creation or loading from JSON schema files.
- Source:
Example
// Sample JSON schema that can be loaded:
{
"title": "My dataset",
"type": "object",
"properties": {
"geom": {
"const": "Point"
},
"string_attr": {
"type": "string"
},
"string_attr_options": {
"type": "string",
"enum": ["A", "B", "C"]
},
"integer_attr": {
"type": "integer"
},
"integer_attr_range": {
"type": "integer",
"minimum": 1,
"maximum": 10
},
"integer_attr_options": {
"type": "integer",
"enum": [0, 1, 2]
},
"number_attr": {
"type": "number"
},
"number_attr_range": {
"type": "number",
"minimum": 1.5,
"maximum": 2.5
},
"number_attr_options": {
"type": "integer",
"enum": [0.5, 1.5, 2.5]
},
"date_attr": {
"type": "string",
"format": "date"
}
},
"required": ["string_attr", "geom"]
}