-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First QRIS metric, schema and digest builder
- Loading branch information
1 parent
fb48761
commit 64ef30b
Showing
4 changed files
with
593 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"$schema": "../qris_metrics.schema.json", | ||
"name": "Dam Density", | ||
"machine_name": "dam_density", | ||
"calculation_name": "count", | ||
"default_level": "METRIC", | ||
"units": "meters", | ||
"description": "The number of dams per square kilometer.", | ||
"definition_url": "https://whatever.com", | ||
"metadata": {}, | ||
"metric_params": { | ||
"layers": [ | ||
{ | ||
"layer_name": "structural_elements_points", | ||
"count_field": "Structure Count", | ||
"layer_type": "point", | ||
"attribute_filter": { | ||
"field_name": "Type", | ||
"values": [ | ||
"Dam", | ||
"Dam Complex" | ||
] | ||
} | ||
}, | ||
{ | ||
"layer_name": "structural_elements_lines", | ||
"attribute_filter": { | ||
"field_name": "Type", | ||
"values": [ | ||
"Dam", | ||
"Dam Complex" | ||
] | ||
} | ||
}, | ||
{ | ||
"layer_name": "structural_elements_areas", | ||
"attribute_filter": { | ||
"field_name": "Type", | ||
"values": [ | ||
"Dam", | ||
"Dam Complex" | ||
] | ||
} | ||
} | ||
], | ||
"normalization": "CENTERLINE", | ||
"surfaces": [ | ||
{ | ||
"surface_name": "dem", | ||
"surface_type": "raster" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"properties": { | ||
"$schema": { | ||
"type": "string" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"machine_name": { | ||
"type": "string", | ||
"pattern": "^[a-z][a-z0-9_]{3,}$" | ||
}, | ||
"calculation_name": { | ||
"type": "string" | ||
}, | ||
"default_level": { | ||
"type": "string", | ||
"enum": ["METRIC", "INDICATOR"] | ||
}, | ||
"units": { | ||
"type": "string" | ||
}, | ||
"description": { | ||
"type": "string" | ||
}, | ||
"definition_url": { | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"metadata": { | ||
"type": "object" | ||
}, | ||
"metric_params": { | ||
"type": "object", | ||
"properties": { | ||
"layers": { | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"layer_name": { | ||
"type": "string", | ||
"pattern": "^[a-z][a-z0-9_]{3,}$" | ||
}, | ||
"usage": { | ||
"type": "string" | ||
}, | ||
"count_field": { | ||
"type": "string" | ||
}, | ||
"layer_type": { | ||
"type": "string", | ||
"enum": ["point", "line", "polygon"] | ||
}, | ||
"attribute_filter": { | ||
"type": "object", | ||
"properties": { | ||
"field_name": { | ||
"type": "string" | ||
}, | ||
"values": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"field_name", | ||
"values" | ||
], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"required": [ | ||
"layer_name" | ||
], | ||
"additionalProperties": false | ||
} | ||
] | ||
}, | ||
"surfaces": { | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"surface_name": { | ||
"type": "string" | ||
}, | ||
"surface_type": { | ||
"type": "string", | ||
"enum": ["raster", "vector"] | ||
} | ||
}, | ||
"required": [ | ||
"surface_name" | ||
], | ||
"additionalProperties": false | ||
} | ||
] | ||
}, | ||
"normalization": { | ||
"type": "string", | ||
"enum": ["CENTERLINE"] | ||
} | ||
}, | ||
"required": [ | ||
"layers" | ||
], | ||
"additionalProperties": false | ||
}, | ||
"surfaces": { | ||
|
||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"machine_name", | ||
"calculation_name", | ||
"metric_params" | ||
], | ||
"additionalProperties": false | ||
} |
Oops, something went wrong.