Affine trans. matrix element ordering for `ST_Affine`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 85/100
Research direction
Locate the .trans_f() function in the package source and replace the !!!v splice with c(t(m[, -ncol(m)]), m[, ncol(m)]) to match DuckDB's ST_Affine order. Run the spatial transform tests (including the two new ones) to confirm a rotation is no longer transposed.
Written by the indexing model from the issue text.
Description
.trans_f()hands the matrix toST_Affine()with!!!v, which splices it column by column. Forrbind(c(a, b, xoff), c(d, e, yoff))the call becomesST_Affine(geometry, a, d, b, e, xoff, yoff), but DuckDB's 2D signature isST_Affine(geom, a, b, d, e, xoff, yoff). So the 2 × 2 part is transposed and a rotation comes out turned the other way. The two new tests use a translation and a diagonal scale, which give the same result either way.c(t(m[, -ncol(m)]), m[, ncol(m)])would give DuckDB the order it expects, in 2D and 3D.Cuiwei
Originally posted by @CuiweiG in #251
Following the above comment, should be an easy fix.
- Dominant language
- R
- Stars
- 37
- Forks
- 10
- Avg merge
- 22h 46m
- Merged PRs (30d)
- 20
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from HelenaLC/spatialdataR
-
readPoint() reads only part.0.parquet, so points written from a partitioned dask frame lose rowsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HelenaLC/spatialdataR#287 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
HelenaLC/spatialdataR#252 ·
Maintainers usually reply within 1 day
-
axes order in image/label show methodPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
HelenaLC/spatialdataR#239 · 11 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 60/100
HelenaLC/spatialdataR#271 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
HelenaLC/spatialdataR#251 · 9 comments · 3 reactions ·
Maintainers usually reply within 1 day
All issues in HelenaLC/spatialdataR
Similar issues
-
bug triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
easystats/parameters#1290 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
corybrunson/ordr#91 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pharmaverse/admiralonco#366 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100