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

Add internal function ql:isGeoPoint #1565

Merged
merged 5 commits into from
Oct 27, 2024
Merged

Add internal function ql:isGeoPoint #1565

merged 5 commits into from
Oct 27, 2024

Commits on Oct 18, 2024

  1. Add function geof:isWktPoint

    The function returns true if and only if the argument is a WKT point.
    This can be checked efficiently by checking the datatype bits of the ID.
    
    Note that this function is not part of the GeoSPARQL standard. We add it
    because we need it for https://github.com/ad-freiburg/qlever-petrimaps
    to fetch alll WKT literals that are not points efficiently.
    Hannah Bast committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    c562c81 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2024

  1. Rename function from geof:iswktpoint to geof:isPointWKT

    Reason: the predicate is called `geo:asWKT`, so the new name looks more
    consistent with that.
    Hannah Bast committed Oct 19, 2024
    Configuration menu
    Copy the full SHA
    26500a9 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2024

  1. Configuration menu
    Copy the full SHA
    d1fb9e4 View commit details
    Browse the repository at this point in the history
  2. Make it a QLever-internal function + rename constants

    1. It was not a good idea to make this a `geof:` function for two
       reasons: First, it's not a standard `geof:` function. Second, and
       worse, the function does not actually check whether the argument is a
       WKT point, it only checks whether the argument is a WKT point that is
       stored in the `Id`. There are also WKT points that are not stored in
       the `Id` for various reasons (notably, when the coordinates are out
       of range). It is therefore now a QLever-internal function with the
       name `ql:isGeoPoint`, following the name of the `Datatype`.
    
    2. This is our first QLever-internal function, so far we only had
       QLever-internal predicates (like `ql:has-predicate` or `ql:langtag`)
       and entities (like `ql:@en`, which technicall is not a valid IRI, but
       that is not relevant here). This required new constants in
       `Constants.h`, which prompted me to give better names to the other
       constants there related to QLever-internal stuff. This, in turn,
       required renaming in quite a few files. It looks like a lot, but
       almost all of it is really just straightforward renaming.
    Hannah Bast committed Oct 26, 2024
    Configuration menu
    Copy the full SHA
    7e741be View commit details
    Browse the repository at this point in the history
  3. Merge origin/master + add test case

    Hannah Bast committed Oct 26, 2024
    Configuration menu
    Copy the full SHA
    7093ff7 View commit details
    Browse the repository at this point in the history