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

Fix inconsistent behaviour of feature version filter when using the CLI #188

Merged
merged 1 commit into from
May 12, 2021

Conversation

clausnagel
Copy link
Member

The feature version filter behaves differently for different CLI commands. To reproduce the following examples, load a small dataset into an empty database and terminate all features right afterwards.

  1. export -H localhost -u user -p password -d db -o test.gml

    When doing a CityGML export from the database with the above command, no features will be exported because the
    command only works on non-terminated features by default.

  2. export -H localhost -u user -p password -d db -o test.gml -t Building

    When changing the command by adding a filter (like the feature type filter above), the behaviour changes. The command
    does not use a default feature version filter anymore and, thus, all buildings are exported. If you only want to export non-
    terminated features in this case, you must explicitly add -r latest.

  3. export-vis -H localhost -u user -p password -d db -o test.kml -D collada -l halod

    A simple visualization export behaves like the first CityGML export example. Only non-terminated feature get exported.

  4. export-vis -H localhost -u user -p password -d db -o test.kml -D collada -l halod -t Building

    Adding another filter does not change the behaviour - again only non-terminated features are exported. Thus, export and
    export-vis behave differently.

Note that the delete command behaves like the export command. The different behaviours of the commands are at least unexpected. This PR proposes that all commands should behave the same and use a default feature version filter for non-terminated features.

@yaozhihang yaozhihang merged commit 81b97ab into master May 12, 2021
@clausnagel clausnagel deleted the hotfix-feature-version-filter-cli branch May 15, 2021 14:19
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.

2 participants