From 8790bb4dd53173d2cbc6f22ec9859208590ecdf0 Mon Sep 17 00:00:00 2001 From: Jacob Wasserman Date: Tue, 28 Nov 2023 14:56:05 -0500 Subject: [PATCH] Change to covering from geometry_bbox. Doc updates. Change the geometry_bbox to the broader "covering" section. Update tests and examples. Made some documentation updates: * Parquet schema -> group * Do not require zmin/zmax if geometries have 3 dimensions --- examples/example.parquet | Bin 29627 -> 29631 bytes examples/example_metadata.json | 8 +++++--- format-specs/geoparquet.md | 21 ++++++++++++++++----- format-specs/schema.json | 16 +++++++++++----- scripts/generate_example.py | 4 +++- scripts/test_json_schema.py | 11 ++++++----- 6 files changed, 41 insertions(+), 19 deletions(-) diff --git a/examples/example.parquet b/examples/example.parquet index 1e7bc885ae58391ccca1a666aacc08d8ae447fc4..2b5da28690fcc81b1f66a6aa32b42c339ca35fb9 100644 GIT binary patch delta 697 zcmYjOzi--55Qe2<$k3reO*;gkpbQya?8I&8Qk{)$AS#7a6oWd12hB^20RzRPR26$N zzIN)~xl+aq{d2N*?$o=ZiDJq3?#FlczVF`6ZTk0Z`q$-2`up|O$?#F3H%>lI&qpf% zD)%KX#}|C|#?gE@LN_ld^;K`G4{4q9VJ(v4P4tfyAXfUNR1K4HHA?x=eX&O<# zT(vmqhS*ee(Xd)L<1DLNtL6BJY{xua1g0?v%=gRw7A9~Y?pD!SD-0vUi*P{ym~Q2K zN_2x-5}581@iV$+a!<3V|HjXr`_`FkaTgd=DwfdDc3e-3S$0KS>`Ro0 z-5Tq4BTJ7q32ov*Z%vPSr`m=K${8I|+$X;E+3< zD)SYbkT`PSbNG$U%+h8huV;4NynS!%*SFluTkh%ZEcfU6{w!Ml8upT?HyL05)H?Z{ z|Gs{k?&4!p`F=s4Fsw~{r7g*g>r zhR?ypK+oWiQUNx=QHYJI0WAQZaz#WIAq}HtZ3?l6ncb|?p~9;$p^a~>VASnH317F}myp*gEy3}hzW?>&e$xXHA7Q68;KKyZvO~n)3 z*sNlQYGH;!kPuTG9Lm1-oPOYSn&cb_XQ-8?YQzwVTdUST!hJKc#qhn&wRMG zNhSU str: "crs": json.loads(df.crs.to_json()), "edges": "planar", "bbox": [round(x, 4) for x in df.total_bounds], - "geometry_bbox": {"column": "bbox"}, + "covering": { + "box": {"column": "bbox"}, + }, }, }, } diff --git a/scripts/test_json_schema.py b/scripts/test_json_schema.py index dfafbce..2ef8d27 100644 --- a/scripts/test_json_schema.py +++ b/scripts/test_json_schema.py @@ -41,8 +41,10 @@ def get_version() -> str: "geometry": { "encoding": "WKB", "geometry_types": [], - "geometry_bbox": { - "column": "bbox", + "covering": { + "box": { + "column": "bbox", + }, }, }, }, @@ -216,16 +218,15 @@ def get_version() -> str: # Geometry Bbox metadata = copy.deepcopy(metadata_template) -metadata["columns"]["geometry"]["geometry_bbox"].pop("column") +metadata["columns"]["geometry"]["covering"].pop("box") invalid_cases["empty_geometry_bbox"] = metadata metadata = copy.deepcopy(metadata_template) -metadata["columns"]["geometry"]["geometry_bbox"]["column"] = "" +metadata["columns"]["geometry"]["covering"]["box"]["column"] = "" invalid_cases["empty_geometry_bbox_column"] = metadata - # # Tests @pytest.mark.parametrize(