Skip to content

Add Postgis Geography codec#727

Open
mdedetrich wants to merge 1 commit into
pgjdbc:mainfrom
mdedetrich:add-postgis-geography
Open

Add Postgis Geography codec#727
mdedetrich wants to merge 1 commit into
pgjdbc:mainfrom
mdedetrich:add-postgis-geography

Conversation

@mdedetrich

@mdedetrich mdedetrich commented Jul 8, 2026

Copy link
Copy Markdown

Make sure that:

  • You have read the contribution guidelines.
  • You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
  • You use the code formatters provided here and have them applied to your changes. Don't submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.

Issue description

Resolves: #528

New Public APIs

PostgisGeographyCodec (if this counts as an API).

Additional context

Note that the implementation does have a fair bit of boilerplate due to PostgisGeographyCodec being final and hence not being able to be subclassed. One alternative would be to have a package private implementation that both PostgisGeographyCodec and PostgisGeometryCodec can share (that way both PostgisGeographyCodec and PostgisGeometryCodec can be final).

As suggested in the linked github issue, the implementation is just a copy paste of PostgisGeometryCodec that also uses the org.locationtech.jts.geom.Geometry but this allows you to decode postgres geography types.

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.

Add geography data type support

1 participant