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

Multi Linestring with 'EMPTY' in the point throwing error #167

Open
jnylen opened this issue Dec 13, 2021 · 3 comments
Open

Multi Linestring with 'EMPTY' in the point throwing error #167

jnylen opened this issue Dec 13, 2021 · 3 comments

Comments

@jnylen
Copy link

jnylen commented Dec 13, 2021

Hi,

Lovely lirary but we are having an issue with MULTILINESTRINGs where it includes "EMPTY" in it similar to:

SRID=4326;MULTILINESTRING((17.3184738535347 60.7864700694704,17.3180661577644 60.7874544933595),EMPTY,EMPTY)

It would then throw this error:

** (DBConnection.ConnectionError) client #PID<0.2818.0> stopped: ** (FunctionClauseError) no function clause matching in anonymous fn/2 in Geo.WKB.Decoder.do_decode/4
    (geo 3.4.2) lib/geo/wkb/decoder.ex:121: anonymous fn(1, <<1, 2, 0, 0, 0, 0, 0, 0, 0>>) in Geo.WKB.Decoder.do_decode/4

The line in the log are kinda incorrect. The lines that matter are these: https://github.com/bryanjos/geo/blob/master/lib/geo/wkb/decoder.ex#L108-L111

@bryanjos
Copy link
Contributor

Hi, thanks for bringing this up. I didn't know EMPTY was a thing. I can look into it but I will also take any PRs to resolve this.

@jnylen
Copy link
Author

jnylen commented Dec 5, 2023

@bryanjos still receiving this, is this being looked into? Should I take a look at it?

@s3cur3
Copy link
Contributor

s3cur3 commented Aug 30, 2024

@jnylen If you'd like to submit a PR, that'd be awesome. I'm not sure what the expected behavior here would be—do we stick nil values in the multilinestring's coordinates, or just remove the empty values?

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

No branches or pull requests

3 participants