Skip to content

Filtering by geometry requires column named "geometry" #52

Description

@wonder-sk

When filtering by geometry, currently the tool is always expecting that the geometry column is named geometry - but this does not need to be the case - other names can be used - e.g. geom.

The problem is here: https://github.com/MerginMaps/mergin-work-packages/blob/main/workpackages/wp.py#L303

Python error:

Traceback (most recent call last):
  File "mergin_work_packages.py", line 5, in <module>
    run_wp_mergin_with_context(parse_args())
  File "/mergin-work-packages/workpackages/wp_mergin.py", line 309, in run_wp_mergin_with_context
    make_work_packages(ctx.wp_alg_dir, wp_config)
  File "/mergin-work-packages/workpackages/wp.py", line 304, in make_work_packages
    c.execute(f"""delete from {wp_tab_name_esc} where not {intersects_query}""")
sqlite3.OperationalError: no such column: geometry

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions