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

Unsquish after #600 #603

Merged
merged 4 commits into from
Jan 11, 2025
Merged

Unsquish after #600 #603

merged 4 commits into from
Jan 11, 2025

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Jan 10, 2025

  • I agree to follow the project's code of conduct.
  • I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

@JmsPae
Copy link
Contributor

JmsPae commented Jan 10, 2025

Also some minor errors in CHANGELOG.md;

  • Line 19: get_point_vecx now returns usize, not i32
  • Line 38: Redundant comma and space

@lnicola
Copy link
Member Author

lnicola commented Jan 11, 2025

I guess get_point_vec should be called get_points now?

///
/// Only wkbPoint[X], wkbLineString[X] or wkbCircularString[X] may alter `out_points`. Other geometry types will silently do nothing, see
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 rephrased this, since it wasn't exactly correct (MultiPoint has points, for example).

@lnicola
Copy link
Member Author

lnicola commented Jan 11, 2025

r? @JmsPae

(that's a review request, I can't pick you from the reviewers box)

Copy link
Contributor

@JmsPae JmsPae left a comment

Choose a reason for hiding this comment

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

No complaints here.

@JmsPae
Copy link
Contributor

JmsPae commented Jan 11, 2025

Upon some reflection, however, it was weird for get_points to append to a vec instead of overwriting it, but that could be addressed elsewhere if you just want to push this PR out.

@lnicola
Copy link
Member Author

lnicola commented Jan 11, 2025

I thought so too, but it matches e.g. BufRead::read_line and Read::read_to_end, so at least there's some prior art. I even appreciated your diligence there :-).

@JmsPae
Copy link
Contributor

JmsPae commented Jan 11, 2025

Thank you!

I'd prefer if it follows the original lib's behavior and overwrites the vec, but whether or not you want to fix it here or want to keep it is up to you. (I'm scheming for a switch over to OGR_G_GetPoints so i suppose you really don't have to)

@lnicola
Copy link
Member Author

lnicola commented Jan 11, 2025

I think appending makes sense in some cases (maybe you're producing something like WKB or another compact format), so I wouldn't mind keeping it for now.

@lnicola lnicola merged commit 90d7cbf into georust:master Jan 11, 2025
13 checks passed
@lnicola lnicola deleted the unsquish branch January 11, 2025 10:13
@JmsPae
Copy link
Contributor

JmsPae commented Jan 11, 2025

I think appending makes sense in some cases (maybe you're producing something like WKB or another compact format), so I wouldn't mind keeping it for now.

Yea, I suppose if we end up 'fixing' it back to overwriting the vec then we can always add another method for appends.

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