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

geo/geoindex: clipping geometries with Z/M coords results in an invalid geometry #63126

Open
andyyang890 opened this issue Apr 6, 2021 · 1 comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-spatial Spatial Team X-nostale Marks an issue/pr that should be ignored by the stale bot

Comments

@andyyang890
Copy link
Collaborator

andyyang890 commented Apr 6, 2021

When geos.ClipByRect is passed a geometry with Z and/or M coordinates, it returns an invalid geometry.

For example,

originalEWKB: 010200008004000000c8672c0481c7d0c1c0d953e3dfa1a34112dddd513f28f2c13062bb2bf056d0c1cfe5bc3cb9dbf3c138096b28da41fc415c18b9d4eaac01427c8aacfab3bdf9412c0956c53ce9fe411d95e95ecd9df7c1186bf117c6b9d341978eacce9011fcc1
clippedEWKB: 010500008002000000010200008002000000c8672c0481c7d0c1c0d953e3dfa1a34112dddd513f28f2c1b091998d0599d0c13333c3f5285cdfc1000000000000f87f010200000002000000a64b3c2e563cd9413333c3f5285cdfc1333383f5285cdf4144c4065c4c47d8c1

As a temporary fix, #63127 will force the geometry to XY layout before clipping. This however results in slower indexing of 3D/4D geometries for shapes that are out of bounds of the SRID.

Jira issue: CRDB-6436

@andyyang890 andyyang890 added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Apr 6, 2021
@jlinder jlinder added the T-spatial Spatial Team label Jun 16, 2021
@github-actions
Copy link

We have marked this issue as stale because it has been inactive for
18 months. If this issue is still relevant, removing the stale label
or adding a comment will keep it active. Otherwise, we'll close it in
10 days to keep the issue queue tidy. Thank you for your contribution
to CockroachDB!

@otan otan added X-nostale Marks an issue/pr that should be ignored by the stale bot and removed no-issue-activity labels Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-spatial Spatial Team X-nostale Marks an issue/pr that should be ignored by the stale bot
Projects
None yet
Development

No branches or pull requests

3 participants