-
-
Notifications
You must be signed in to change notification settings - Fork 617
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
[Pg] Add PostGIS MultiLineString support #2769
base: beta
Are you sure you want to change the base?
Conversation
@@ -45,3 +45,64 @@ export function parseEWKB(hex: string): [number, number] { | |||
|
|||
throw new Error('Unsupported geometry type'); | |||
} | |||
|
|||
export function parseMultiLineStringEWKB(hex: string): [number, number][][] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disclaimer: I did this function with AI, it may have mistakes. My PostgreSQL knowledge is not that deep to write it myself. 😅
I'm unable to run the tests. 😢 I'm following the guidelines (nvm use, open docker, pnpm i, pnpm build, cd integration-tests, pnpm test), but the It is not breaking due to my PR, because I'm runing the tests in main the branch. Could you (mantainers) run the tests in your computer, or help me run them? |
Adds support for
MultiLineString
from PostGIS.Currently, the
geometry
type added in v0.31.0 only supportspoint
, despite the documentation saying otherwise.I did this PR because I need a
MultiLineString
in my project, but if you come up with a way to support any PostGIS type, it would be awesome, meanwhile, adding the typemultilinesting
may be enough.The signature I defined is quite minimal and trivial, so if in the future you decide to internally implement PostGIS in a completely different way, it probably won't have breaking changes.