Skip to content

Support for geospatial types - point, line, box, polygon etc #306

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

Closed
wants to merge 8 commits into from

Conversation

anshlykov
Copy link
Contributor

Resolves #282

@mp911de
Copy link
Collaborator

mp911de commented Jul 27, 2020

Thanks for your contribution. Please note there's another pull request (#305) that ships with lseg support. Since this PR covers the remaining geo codecs it makes sense to consider this one over #305.

@mp911de mp911de added the type: enhancement A general enhancement label Jul 27, 2020
@mp911de mp911de added this to the 0.8.5.RELEASE milestone Jul 28, 2020
Copy link
Collaborator

@mp911de mp911de left a comment

Choose a reason for hiding this comment

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

Awesome work, thanks a lot. Especially the refactoring towards the Geometry codec was overdue.

I left a few minor comments. Care to have a look?

*/
public final class Line {

private final double a;
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should add a bit of Javadoc to the fields.

this.c = c;
}

public static Line of(double a, double b, double c) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it make sense to add factory methods accepting two points or even x1/y1, x2/y2?

@anshlykov
Copy link
Contributor Author

@mp911de thanks for the review. I updated the Line class

mp911de pushed a commit that referenced this pull request Jul 31, 2020
Also, refactor geometry support by extracting common code into AbstractGeometryCodec

[resolves #282][#306]
@mp911de mp911de closed this in fec2ba3 Jul 31, 2020
mp911de pushed a commit that referenced this pull request Jul 31, 2020
Also, refactor geometry support by extracting common code into AbstractGeometryCodec

[resolves #282][#306]
mp911de added a commit that referenced this pull request Jul 31, 2020
Add javadoc to factory methods. Add since tags. Use consistently String.format(…) for toString. Fix Path equals and hashCode. Add license headers.

Introduce TokenStream to avoid repeated Double.parse(…) calls.

Fix binary representation of Path.open as in Postgres the protocol transmits of the Path is closed so we need to negate the flag.

[closes #306][#282]
@mp911de
Copy link
Collaborator

mp911de commented Jul 31, 2020

Thank you for your contribution. That's merged, polished, and backported now.

@anshlykov anshlykov deleted the gh-282 branch July 31, 2020 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for geospatial types - point, line, box, polygon etc
2 participants