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

feat(wkt): Add TWKB parser WIP #2028

Merged
merged 2 commits into from
Sep 18, 2023
Merged

feat(wkt): Add TWKB parser WIP #2028

merged 2 commits into from
Sep 18, 2023

Conversation

ibgreen
Copy link
Collaborator

@ibgreen ibgreen commented Dec 16, 2021

Code structure looks quite similar to WKB, remaining work, especially on encoder side, should be very similar to what we did for WKB.

@ibgreen ibgreen requested a review from kylebarron December 16, 2021 15:08
@@ -33,7 +33,7 @@ enum WKB {
/**
* Options for encodeWKB
*/
interface WKBOptions {
type WKBOptions = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is type better than interface?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If not better, it is at least less ambiguous. Admittedly I have some baggage from other languages, but to me, interface is an object oriented concept that is intended to describe (mostly) methods that need to be defined by a class, so I think it looks strange to see interface used to describe a pure object without any methods.

I suspect interface is favored in some type script code because of historical reasons (maybe type was a later addition?)

@@ -20,7 +20,7 @@ import BinaryWriter from './utils/binary-writer';
* Integer code for geometry type
* Reference: https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary
*/
enum WKB {
export enum WKB {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove and import from wkb-types?

Copy link
Collaborator

@kylebarron kylebarron left a comment

Choose a reason for hiding this comment

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

Looks like a good start

@ibgreen ibgreen marked this pull request as ready for review September 18, 2023 22:37
@ibgreen ibgreen merged commit dcaabf1 into master Sep 18, 2023
@ibgreen ibgreen deleted the twkb branch September 18, 2023 22:37
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