Skip to content

Align GeographyType values with shapely.GeometryType#98

Draft
benbovy wants to merge 1 commit intomainfrom
geography-type-values2
Draft

Align GeographyType values with shapely.GeometryType#98
benbovy wants to merge 1 commit intomainfrom
geography-type-values2

Conversation

@benbovy
Copy link
Owner

@benbovy benbovy commented Feb 4, 2025

Replaces #90 (automatically closed by deleting target branch != main).
Closes #88.

Copy link
Collaborator

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

I don't have a strong opinion about whether it is better to align, or better to just have our own enum (or align with WKB values, which is 1-7).
Whichever we choose, it should always be recommended to compare with the enum and not with a direct integer, and if you follow that then the actual number does not matter too much.

@benbovy
Copy link
Owner Author

benbovy commented Feb 14, 2025

Whichever we choose, it should always be recommended to compare with the enum and not with a direct integer, and if you follow that then the actual number does not matter too much.

I agree, however there's no easy way to support that here (#51 (comment)) so we have to stick with comparing values for now (hence this PR and #88).

That said, aligning with WKB is a good point (I didn't know about that) and probably better than aligning with shapely? I'll leave this PR and #88 open and move on with the 0.1.0 release.

@benbovy benbovy marked this pull request as draft February 14, 2025 08:29
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.

spherely.GeographyType vs. shapely.GeometryType id values

2 participants