ndjson-cli icon indicating copy to clipboard operation
ndjson-cli copied to clipboard

ndjson-join join using a function instead of ndjson-join expression₀ expression₁

Open ThomasG77 opened this issue 4 years ago • 0 comments

I enjoy using your cli. Using it, I'm stuck to make a join on a more complex condition than simple col1 = col2 using ndjson-join expression₀ expression₁ file₀ file₁. I want in particular to make spatial comparison using something similar to the following pseudo code (for illustrating the idea)

ndjson-join 'col1' 'col2' -r turf=@turf/turf 'turf.booleanWithin(d0, d1)' 'd = Object.assign(d0.properties, d1.properties), d' <(ndjson-split 'd.features' < points.geojson) <(ndjson-split 'd.features' < polys.geojson)

d0 and d1 would be alias for 1st and 2nd columns

Any idea own to achieve something similar using your cli? I missed the obvious? Outside of the intended scope?

Thanks for any ideas/feedback

ThomasG77 avatar Dec 04 '21 21:12 ThomasG77