Skip to content

Replace Tissot-centric CNG cookbook with tool-agnostic per-format validation sections#5

Merged
chrislyonsKY merged 2 commits into
mainfrom
copilot/rewrite-cng-cookbook-contribution
Mar 10, 2026
Merged

Replace Tissot-centric CNG cookbook with tool-agnostic per-format validation sections#5
chrislyonsKY merged 2 commits into
mainfrom
copilot/rewrite-cng-cookbook-contribution

Conversation

Copilot AI commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Community feedback: a standalone Tissot cookbook reads as tool docs, not format guidance. The CNG Formats Guide needs validation content woven into existing format pages, not a separate Tissot how-to.

Deleted

  • cng-cookbook-contribution.qmd — Tissot-first cookbook

Added

  • cng-format-validation-sections.qmd — three self-contained sections, each ready to PR into its corresponding CNG guide format page (before "Further Reading")

Section structure (consistent across all three):

concept → why it matters → how to verify → how to fix

Section 1 — Validating Your FlatGeobuf

  • Spatial index: packed Hilbert R-tree, detect via ogrinfo/Fiona, fix with ogr2ogr -lco SPATIAL_INDEX=YES
  • CRS metadata: no WGS 84 default, assign vs. reproject (-a_srs / -t_srs)
  • FlatGeobuf vs. GeoParquet decision table

Section 2 — Validating Your GeoParquet

  • geo metadata key: required for spec compliance, verify with pyarrow.parquet.read_metadata(), fix via GeoPandas re-write
  • CRS encoding: PROJJSON required; detect WKT1/missing programmatically
  • Compression: zstd recommended (50–70% reduction); inspect per-column codec, re-write with compression="zstd"
  • Bbox columns: row-group spatial pruning, how to check presence

Section 3 — Validating Your Shapefile Before Migration

  • Multi-file integrity: required (.shp, .shx, .dbf) vs. recommended (.prj, .cpg), consequences of each missing file, Python completeness check
  • 2 GB limit: silent truncation risk, size check + feature-count cross-validation via ogrinfo

Conventions

  • Tool-agnostic throughout (ogrinfo, stdlib Python, GeoPandas)
  • Tissot referenced only as a "See also" link inside the HTML contributor note — not in any substantive section
  • Contributor note at bottom covers placement, heading-level adjustment, and cross-reference handling for individual page PRs
Original prompt

Read cng-cookbook-contribution.qmd in the repo root.
This file needs to be completely rewritten. Community feedback on the CNG Formats Guide said a standalone Tissot cookbook reads as tool documentation, not format guidance. They want per-format validation sections woven into existing format pages instead.
Replace cng-cookbook-contribution.qmd with cng-format-validation-sections.qmd that contains three separate validation sections, each designed to be PR’d into the corresponding format page in the CNG guide (https://guide.cloudnativegeo.org/).
Use Quarto markdown (.qmd) format. Each section should have a clear heading like “Validating Your FlatGeobuf” that could slot into the end of an existing format page.
Section 1: FlatGeobuf Validation
∙ Spatial index: explain that FlatGeobuf optionally includes a packed Hilbert R-tree. Without it, spatial queries require full file scan. Show how to verify with ogrinfo and Python (fiona). Show how to regenerate with ogr2ogr -lco SPATIAL_INDEX=YES.
∙ CRS metadata: explain it’s stored in the header, doesn’t default to WGS 84. Show how to verify with ogrinfo. Show how to assign with ogr2ogr -a_srs.
∙ When to choose FlatGeobuf vs GeoParquet: spatial queries and streaming → FlatGeobuf. Columnar filtering and analytics → GeoParquet.
Section 2: GeoParquet Validation
∙ Geo metadata: explain the required geo metadata key in Parquet schema metadata (JSON with geometry column, CRS as PROJJSON, geometry types). Show how to verify with pyarrow.parquet.read_metadata(). Show how to fix with geopandas re-write.
∙ CRS encoding: should be PROJJSON per spec. Flag WKT1 or missing CRS.
∙ Compression: recommend zstd for best compression/speed tradeoff (50-70% reduction). Show how to check codec per column with pyarrow. Show how to re-write with compression.
∙ Bounding box column: explain optional bbox columns enable row-group-level spatial filtering. Show how to check if present.
∙ When to choose GeoParquet vs FlatGeobuf.
Section 3: Shapefile Validation Before Migration
∙ Multi-file integrity: list required files (.shp, .shx, .dbf) and recommended (.prj, .cpg). Explain what goes wrong when each is missing (no CRS, corrupted encoding). Show a quick completeness check.
∙ 2GB file size limit: explain silent truncation risk.
Conventions
∙ Concepts first, then why it matters, then how to verify, then how to fix
∙ Tool-agnostic where possible (ogrinfo, Python standard libraries)
∙ Do NOT make Tissot the primary validation method — the guide must be tool-agnostic
∙ Tissot can appear as a “See also” link at the very end, nothing more
∙ Add a contributor note at the bottom explaining these are designed to slot into existing format pages before their “Further Reading” sections
Also delete the old cng-cookbook-contribution.qmd if it still exists after creating the new file


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


You can also share your feedback on Copilot code review. Take the survey.

…ions.qmd

Three per-format validation sections designed to slot into the CNG Formats Guide:
- Validating Your FlatGeobuf (spatial index, CRS metadata, format decision table)
- Validating Your GeoParquet (geo metadata, CRS encoding, compression, bbox column, format decision)
- Validating Your Shapefile Before Migration (multi-file integrity, 2 GB limit)

Each section follows concept → why it matters → how to verify → how to fix.
Tissot appears only as a "See also" in the contributor note.
Deletes old Tissot-centric cookbook.

Co-authored-by: chrislyonsKY <135981795+chrislyonsKY@users.noreply.github.com>
Copilot AI changed the title [WIP] Rewrite cng-cookbook-contribution for validation sections Replace Tissot-centric CNG cookbook with tool-agnostic per-format validation sections Mar 10, 2026
@chrislyonsKY chrislyonsKY marked this pull request as ready for review March 10, 2026 10:23
@chrislyonsKY chrislyonsKY merged commit a3258ec into main Mar 10, 2026
1 check passed
@chrislyonsKY chrislyonsKY deleted the copilot/rewrite-cng-cookbook-contribution branch March 10, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants