-
Notifications
You must be signed in to change notification settings - Fork 149
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
Issue #183 - Support Parsing of MultiPolygon in WKT Format #195
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #195 +/- ##
==========================================
+ Coverage 89.57% 90.05% +0.47%
==========================================
Files 48 48
Lines 1564 1639 +75
Branches 103 103
==========================================
+ Hits 1401 1476 +75
Misses 163 163
Continue to review full report at Codecov.
|
…(increase test coverage)
…(add failure tests)
@roblovelock thanks for working on this
Basically, I can go ahead and prototype how this looks like and create a PR against yours. Let me know! |
I agree. The reason i introduced "wktArray" was that I had only briefly looked over the code and didn't want to break any backward compatibility. it looked to me that the output from wkt was a single shape. therefor wktArray would do the same as wkt but always return an array of shapes (even if it was a single point) and I would leave wkt to only return a single shape. |
@roblovelock got it.. yeah you can change the output from wkt to return anything as long as it matches the schema specified in the WKT expression. I'll refactor this PR a bit to make that change today and merge it in |
@harsha2010 is there is a plan to merge this PR? this is much anticipated addition :-) |
@harsha2010 is there any update on this PR? |
I was unable to find a way to keep the current functionality backward compatible with Multi point WKT.
Because of this I have added a new "wktArray" function. This will parse all forms of WKT and output the result(s) in an array. It will then be up to the end user to explode the array to get a row per point.
the two lines below will output the same point data, however the second will support multipoint and therefore may create multiple rows.
wkt($"text")("point")
explode(wktArray($"text")("point"))