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 parsing Z, M, and ZM WKT strings #115

Merged
merged 11 commits into from
Jul 23, 2024

Conversation

kylebarron
Copy link
Member

  • 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.
  • I ran cargo fmt

@kylebarron
Copy link
Member Author

@michaelkirk since the changes from #110 might be fresh on your mind, do you want to look at the merge conflicts here and/or do you have suggestions for how to resolve them? Or do you want to look at the approach I took here and maybe rebase those onto the latest main?

@kylebarron
Copy link
Member Author

@michaelkirk
Copy link
Member

michaelkirk commented Jul 17, 2024

@michaelkirk since the changes from #110 might be fresh on your mind, do you want to look at the merge conflicts here and/or do you have suggestions for how to resolve them? Or do you want to look at the approach I took here and maybe rebase those onto the latest main?

Sorry, I wouldn't have merged that if I knew you were working on this. I'll push up a resolution in a moment. The changes are pretty mechanical.

@michaelkirk
Copy link
Member

I'm seeing some tests failing with your branch. Can you fix those up?

failures:

---- tests::empty_items stdout ----
thread 'tests::empty_items' panicked at src/lib.rs:380:63:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- tests::lowercase_point stdout ----
thread 'tests::lowercase_point' panicked at src/lib.rs:395:63:
called `Option::unwrap()` on a `None` value

---- types::multipoint::tests::empty_multipoint stdout ----
thread 'types::multipoint::tests::empty_multipoint' panicked at src/types/multipoint.rs:151:63:
called `Result::unwrap()` on an `Err` value: "Unexpected word before open paren"


failures:
    tests::empty_items
    tests::lowercase_point

@kylebarron
Copy link
Member Author

Sorry, I wouldn't have merged that if I knew you were working on this.

No worries! It was just bad luck!

@kylebarron
Copy link
Member Author

tests all pass locally now!

@kylebarron
Copy link
Member Author

Do you know why CI isn't running on this branch?

@michaelkirk
Copy link
Member

I do not know why CI isn't running for your branch. Maybe related to the conflicts in the current branch? (working on those now)

@michaelkirk
Copy link
Member

Ok - conflicts resolved.

src/lib.rs Outdated Show resolved Hide resolved
src/types/mod.rs Outdated Show resolved Hide resolved
@kylebarron kylebarron requested a review from michaelkirk July 18, 2024 03:08
@ariesdevil
Copy link
Contributor

So we now only support POINT Z, and no longer support POINTZ?

@michaelkirk
Copy link
Member

That's correct. I don't ever use 3d points, but my understanding is that "POINT Z" is the correct spelling. Please let us know if you have compelling counter examples!

Copy link
Member

@michaelkirk michaelkirk left a comment

Choose a reason for hiding this comment

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

Nice work, thanks @kylebarron!

@kylebarron
Copy link
Member Author

So we now only support POINT Z, and no longer support POINTZ?

I added support for POINTZ (and LINESTRINGZ etc) in the latest commit. It does make the match statement kinda verbose; @michaelkirk what do you think?

@michaelkirk
Copy link
Member

Sure, since there is apparently some precedent for this spelling, I'm OK with (happy to?) support it. Thanks @kylebarron

@kylebarron
Copy link
Member Author

I had missed it but chapter 7 of https://www.ogc.org/standard/sfa/ does define WKT for geometries

@michaelkirk michaelkirk merged commit a26848c into georust:main Jul 23, 2024
1 check passed
@kylebarron kylebarron deleted the kyle/support-zm branch July 23, 2024 15:14
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