File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,8 +12,17 @@ def validate(gpkg_path):
1212 # data = fiona.listlayers(gpkg_path)
1313 gpkg = gpt .read_file (gpkg_path )
1414
15+ # print("\nGeoPackage layers/columns:")
16+ # for name,table in gpkg.layers:
17+ # print(name)
18+ # print(table.columns)
19+ # print()
20+
1521 # This is a workaround during devel, until I understand how to tell jsonschema about the DataFrames
16- data = {ln :ln for ln in gpkg .list ()}
22+ data = {ln :{} for ln in gpkg .list ()}
23+ data ['layer_styles' ]['geometry' ] = list (gpkg ['layer_styles' ]['geometry' ].values )
24+ data ['layer_styles' ]['geometry' ] = []
25+ # print(data)
1726
1827 import jsonschema
1928 res = jsonschema .validate (data , schema )
Original file line number Diff line number Diff line change 99 "type" : " object" ,
1010
1111 "properties" : {
12- "layer_styles" : { "type" : " string" },
13- "geologic_units" : { "type" : " string" },
14- "linear_features" : { "type" : " string" },
15- "surface_features" : { "type" : " string" },
16- "geologic_contacts" : { "type" : " string" }
12+ "layer_styles" : {
13+ "type" : " object" ,
14+ "properties" : {
15+ "geometry" : {
16+ "type" : " array"
17+ }
18+ },
19+ "required" : [
20+ " geometry"
21+ ],
22+ "additionalProperties" : true
23+ },
24+ "geologic_units" : { "type" : " object" },
25+ "linear_features" : { "type" : " object" },
26+ "surface_features" : { "type" : " object" },
27+ "geologic_contacts" : { "type" : " object" }
1728 },
1829
1930 "required" : [
2536 ],
2637
2738 "patternProperties" : {
28- "^[A-Za-z][A-Za-z0-9_]*$" : { "type" : " string " }
39+ "^[A-Za-z][A-Za-z0-9_]*$" : { "type" : " object " }
2940 },
3041
31- "additionalProperties" : { "type" : " string" }
42+ "additionalProperties" : { "type" : " object" }
43+
3244}
You can’t perform that action at this time.
0 commit comments