Skip to content

Commit daaf3da

Browse files
committed
[wip] reset the schema for layer_styles
1 parent 205d8a7 commit daaf3da

2 files changed

Lines changed: 6 additions & 15 deletions

File tree

json_schema/geopackage_layers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ def validate(gpkg_path):
1919
# print()
2020

2121
# This is a workaround during devel, until I understand how to tell jsonschema about the DataFrames
22-
data = {ln:{} for ln in gpkg.list()}
23-
data['layer_styles']['geometry'] = list(gpkg['layer_styles']['geometry'].values)
24-
data['layer_styles']['geometry'] = []
22+
# data = {ln:{} for ln in gpkg.list()}
23+
# data['layer_styles']['geometry'] = list(gpkg['layer_styles']['geometry'].values)
24+
# data['layer_styles']['geometry'] = []
2525
# print(data)
26+
data = gpkg.to_json()
2627

2728
import jsonschema
2829
res = jsonschema.validate(data, schema)

json_schema/geopackage_layers.schema.json

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,8 @@
99
"type": "object",
1010

1111
"properties": {
12-
"layer_styles" : {
13-
"type" : "object",
14-
"properties" : {
15-
"geometry" : {
16-
"type" : "array"
17-
}
18-
},
19-
"required" : [
20-
"geometry"
21-
],
22-
"additionalProperties": true
23-
},
12+
13+
"layer_styles" : { "type" : "object" },
2414
"geologic_units" : { "type" : "object" },
2515
"linear_features" : { "type" : "object" },
2616
"surface_features" : { "type" : "object" },

0 commit comments

Comments
 (0)