MerginMaps / MerginMaps/geodiff

Unknown geometry type: GEOMETRY with non-spatial GPKG

Open
#202 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
183
Forks
21
Avg merge
9d 11h
Merged PRs (30d)
2

Description

This error can happen when using db-sync and doing init from gpkg - after the import of data to "modified" schema, the copy from "modified" schema to "base" schema can fail like this:

The base and modified schemas do not exist yet, going to initialize them ...
GEODIFF: NOTICE:  schema "dbsync_nonspatial" does not exist, skipping

Error: copy failed!
GEODIFF: Error: Unknown geometry type: GEOMETRY

This happens when there's just non-spatial table in the whole GPKG: in order to honor Requirement 17 from GPKG v1.1.0, OGR adds an empty table called ogr_empty_table when writing GPKG (this requirement has been dropped in GPKG v1.2.0).

The workaround for now is to skip that special table, but it would be nice to handle this properly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Reproduce db-sync initialization from a GeoPackage containing only a non-spatial table, then trace the copy from the modified schema to the base schema and handling of ogr_empty_table. Done means initialization succeeds without the “Unknown geometry type: GEOMETRY” error while preserving non-spatial data.

Written by the indexing model from the issue text.

Assessment

Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.