Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering by geometry requires column named "geometry" #52

Open
wonder-sk opened this issue Mar 9, 2023 · 0 comments
Open

Filtering by geometry requires column named "geometry" #52

wonder-sk opened this issue Mar 9, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@wonder-sk
Copy link
Contributor

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
@wonder-sk wonder-sk added the bug Something isn't working label Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant