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

feat: initial commit for adding geometry accessor functions #552

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

richtia
Copy link
Member

@richtia richtia commented Sep 12, 2023

PR to geometry accessor geospatial functions

Copy link
Member

@EpsilonPrime EpsilonPrime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is an initial set of functions there are obviously going to be some missing such as the ability to access the third and fourth dimension of a point. This is fine.

I'm still wondering if we want to absorb the legacy names including deprecated behaviors or want to create a cleaner version (that should still have a one to one correspondence to the non-deprecated postgis implementation).

extensions/functions_geometry.yaml Outdated Show resolved Hide resolved
name: geom
return: boolean
-
name: "st_isring"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want easier to read names such as is_ring? The prefix isn't useful as we already have a namespace as we're in the geometry file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also agree that the prefix isn't useful here, but I figured i'd just follow the same names as used in PostGIS. I think @paleolimbot mentioned that it might be better to keep the same names in order to be taken seriously? I'm open to either though.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think either is ok...when I was referring to the name similarity I meant the part that comes after the st_. I might perhaps even lean slightly towards dropping the prefix.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh gotcha...I'll go ahead and drop the prefix in both the open PRs then!

EpsilonPrime
EpsilonPrime previously approved these changes Sep 12, 2023
EpsilonPrime
EpsilonPrime previously approved these changes Sep 26, 2023
Copy link
Member

@EpsilonPrime EpsilonPrime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good once the remaining typo is fixed.

-
name: "dimension"
description: >
Return the dimension of the input geometry. If the input is a collection of geometries,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The examples below don't necessarily imply dimension. Could we clarify if a line in 3D space considered one dimensional or three?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it would still be one dimensional. I don't think this function takes into consideration the dimensionality of the space, only the geometry itself. Maybe @paleolimbot would have a better idea on this.

Copy link
Member

@EpsilonPrime EpsilonPrime Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all we need to do is add text that clarifies that dimension refers to the complexity of the figures in the geometry and not the coordinate system being used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Just updated.

@richtia richtia merged commit 784fa9b into substrait-io:main Sep 29, 2023
12 checks passed
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.

3 participants