Uh oh!
There was an error while loading. Please reload this page.
Keep M measures when writing to WKB and reading from WKB - #734
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
kaiwinter
commented
Sep 19, 2021
Are there still open issues or may this PR be merged? |
oers
commented
Sep 9, 2022
Any status on this? |
oers
commented
Sep 9, 2022
I had to fix this in WKBWriter, to make it work with XYZM Test for XYZM is missing here |
kaiwinter
commented
Sep 9, 2022
@oers Does the |
oers
commented
Sep 9, 2022
@kaiwinter yes, the textwriter works correctly. I tested both with XYZM Coordinates (reading and writing) |
kaiwinter
commented
Sep 9, 2022
oers
commented
Sep 12, 2022
The wrong method in WKB Writer never wrote the 4th dimension. My Method fixes this (the new one below. It still had a bug) My Test is like this: |
kaiwinter
commented
Sep 14, 2022
@oers I added your changes to this pull request. |
oers
left a comment
There was a problem hiding this comment.
I integrated the changes made here in a project that uses postgis 14. Itworks really well.
jiayuasu
commented
Jan 8, 2024
@kaiwinter@dr-jts Thanks for the great work. Is there a reason why this PR hasn't been merged after a year? Is there anything others could help? WKB format is often used for geometry serialization. Silently missing the M value will lead to incorrect results. We at Sedona uses WKB to serialize XYZM data for our Snowflake support. |
jodygarnett
commented
Aug 23, 2024
Can you rebase and resolve conflicts please? |
@jodygarnett I am not the author of this PR. @kaiwinter could you help us rebase and resolve conflicts? I will wait for @kaiwinter 2-3 days. If he is busy, I will be happy to take over the codebase and create a new PR. This issue might affect multiple Java-based DB engines if Parquet's Geometry type gets merged. We would really appreciate your help to accelerate the review of this PR when the new PR / rebase is ready.. |
M coordinate is read as Z coordinate after writing/reading.
Referring to WKTReader/WKTWriter I added the EnumSet<Ordinate> ordinateFlags. The WKBWriter uses these ordinateFlags to set the correct flags on the byte stream. Signed-off-by: Kai Winter <kaiwinter@gmx.de>
Signed-off-by: Kai Winter <kaiwinter@gmx.de> # Conflicts: # modules/core/src/main/java/org/locationtech/jts/io/WKBWriter.java
kaiwinter
commented
Aug 23, 2024
I did a rebase. Would be great if the PR finally gets merged. |
jnh5y
commented
Aug 23, 2024
I kicked off CI just now; let's see if it builds a-ok! |
There was a problem hiding this comment.
Reading through this I only had minor feedback.
I expect that this may break the GeoTools subclass of WKBReader / WKBWriter that handles curves. With that in mind I am going to check with the GeoTools community to see if some of these methods need to be changed to protected (but this can be done in a separate PR).
We have two things of feedback that can be done as distinct PRs to avoid holding this fix up:
- The use of EnumSet is a nit more complicated then just covering XY, XYM, XYZ, XYZM cases. If desired such a change should happen in several sections of code.
- WKBWriter / WKBReader have several private methods that GeoTools subclass duplicate since they cannot override.
Is that about it?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jodygarnett
commented
Aug 26, 2024
I am now testing a local build of this PR for any regression in GeoTools stack. |
jnh5y
commented
Aug 26, 2024
@jodygarnett cool. Can you make any of your branches public? It'd be awesome to see if @elahrvivaz can test GeoMesa with those branches. Also, @jiayuasu is there any testing that the Sedona / GeoParquet communities can be doing here? Generally, I'd like to point out that we have plenty of time to line all this up! Jody started the paperwork with Eclipse which needs to be done before we release. That'll take a few weeks, so we can take our time, etc. |
jodygarnett
commented
Aug 26, 2024
I am taking notes here geotools/geotools#4884 The branch for that PR is https://github.com/jodygarnett/geotools/tree/jts_1.20.0_update |
jodygarnett
commented
Aug 26, 2024
Oh I kind of screwed up, this PR should have included a change to the release notes. Something to consider for next time. |
The changes I made (adding
ordinateFlags) are mainly taken over from theWKTReader/WKTWriter.