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

Supports of Multi Polygons in pointInPolygon function #3131

Open
alexvaut opened this issue Sep 14, 2018 · 1 comment
Open

Supports of Multi Polygons in pointInPolygon function #3131

alexvaut opened this issue Sep 14, 2018 · 1 comment

Comments

@alexvaut
Copy link

Clickhouse supports polygons in pointInPolygon. This is already great. However it doesn't support Multi Polygon while the Boost library C++ underneath supports it. Right now, we workaround this limitation by using a UNION ALL and a select statement for each sub polygon: "select lon,lat where pointInPolygon((lon, lat),{each_pol})". But this is not efficient since we can have thousands of polygons in one multi polygon. More importantly, it's impossible to store a multi polygon in clickhouse and run the pointInPolygon function directly on it.

Could we envisage adding support of Multi Polygons in pointInPolygon ?

Thanks !

@cBevilaqua
Copy link

Clickhouse supports polygons in pointInPolygon. This is already great. However it doesn't support Multi Polygon while the Boost library C++ underneath supports it. Right now, we workaround this limitation by using a UNION ALL and a select statement for each sub polygon: "select lon,lat where pointInPolygon((lon, lat),{each_pol})". But this is not efficient since we can have thousands of polygons in one multi polygon. More importantly, it's impossible to store a multi polygon in clickhouse and run the pointInPolygon function directly on it.

Could we envisage adding support of Multi Polygons in pointInPolygon ?

Thanks !

I'm having the same requirement.
Can you share an example how you achieved this: select lon,lat where pointInPolygon((lon, lat),{each_pol}) ?
Thanks!

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

No branches or pull requests

4 participants