Skip to content

Respect handleOrdinates also when writing geometry#6380

Open
bjornharrtell wants to merge 1 commit intonpgsql:mainfrom
bjornharrtell:write-ordinates
Open

Respect handleOrdinates also when writing geometry#6380
bjornharrtell wants to merge 1 commit intonpgsql:mainfrom
bjornharrtell:write-ordinates

Conversation

@bjornharrtell
Copy link

@bjornharrtell bjornharrtell commented Dec 18, 2025

This is a proposed fix for #6381.

@bjornharrtell bjornharrtell requested a review from roji as a code owner December 18, 2025 18:10
Copilot AI review requested due to automatic review settings December 18, 2025 18:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 PostGisWriter with the handleOrdinates setting
  • Pass the configured writer to the mappings setup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vonzshik
Copy link
Contributor

Looking through the repo history, it seems like it indeed was missed the first time it was implemented as PostGisWriter doesn't have HandleOrdinates in its constructor, unlike PostGisReader.
@bjornharrtell is is possible to make a test so we have an understanding of what exactly was broken and to prevent future breaks?

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.

2 participants