Respect handleOrdinates also when writing geometry#6380
Respect handleOrdinates also when writing geometry#6380NinoFloris merged 4 commits intonpgsql:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the handleOrdinates configuration option to control which ordinates (coordinate dimensions) are written when serializing geometry objects, not just when reading them. Previously, this option only affected deserialization, which could lead to unexpected ordinates being written when NTS geometry processing introduces additional dimensions.
Key changes:
- Instantiate and configure a
PostGisWriterwith thehandleOrdinatessetting - Pass the configured writer to the mappings setup
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Npgsql.NetTopologySuite/Internal/NetTopologySuiteTypeInfoResolverFactory.cs
Show resolved
Hide resolved
|
Looking through the repo history, it seems like it indeed was missed the first time it was implemented as |
|
@vonzshik agreed, I've now added tests verifying and explained the handleOrdinates behaviour. |
NinoFloris
left a comment
There was a problem hiding this comment.
LGTM, thanks a lot for adding the tests.
@vonzshik did you have any other feedback?
vonzshik
left a comment
There was a problem hiding this comment.
Also looks good to me. Let's see what CI thinks...
(cherry picked from commit b18dd17)
(cherry picked from commit b18dd17)
(cherry picked from commit b18dd17)
|
Thanks @bjornharrtell! Backported to 10.0.2 via 2ee26e4, 9.0.5 via 6c91ba8, and 8.0.9 via c641eb2 |
This is a proposed fix for #6381.