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

Add JTS PostGIS data type support #2074

Merged
merged 1 commit into from Jul 25, 2022
Merged

Conversation

hgschmie
Copy link
Contributor

Support for Postgres PostGIS extension. Based on code by @bchapuis

@hgschmie
Copy link
Contributor Author

@bchapuis, please review

@bchapuis
Copy link
Contributor

@hgschmie Thanks a lot for your help and for the changes, the dedicated module looks good! As mentionned in #2072, I'd love to appear in the commit history for this contribution. I can either cherry pick your last commit in my fork, or you can add me as a co-author in your commit. Either way is fine for me, let me know what you prefer.

Co-Authored-By: Bertil Chapuis <bchapuis@gmail.com>

Support for Postgres PostGIS with the Eclipse LocationTech JTS Topology
Suite. Supports mapping of all LocationTech data types onto PostGIS and
back.

Co-Authored-By: Bertil Chapuis <bchapuis@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Jul 25, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@hgschmie
Copy link
Contributor Author

I added you as co-author (and you show up in the commit history). We really appreciate the contribution.

@hgschmie hgschmie merged commit 6210ddb into jdbi:master Jul 25, 2022
@hgschmie hgschmie deleted the postgis-support branch July 25, 2022 17:51
Copy link
Member

@stevenschlansker stevenschlansker left a comment

Choose a reason for hiding this comment

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

This is great, thank you for the contribution!


static {
if (System.getProperty("PG_FULL_IMAGE") == null) {
System.setProperty("PG_FULL_IMAGE", "postgis/postgis:13-3.2-alpine");
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible that setting this property here affects other tests that might run after? That could introduce test instability depending on order of execution.

@Override
public ColumnMapper<Geometry> getColumnMapper() {
return (resultSet, index, context) -> {
byte[] bytes = hexStringToByteArray(resultSet.getString(index));
Copy link
Member

Choose a reason for hiding this comment

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

Is it not possible to get the byte[] directly via getBytes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants