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

Enhance : Geom filter condition & Task limit #198

Merged
merged 5 commits into from
Jan 12, 2024

Conversation

kshitijrajsharma
Copy link
Member

@kshitijrajsharma kshitijrajsharma commented Jan 12, 2024

What does this PR do ?

  • Introduces task limits on config
  • Adds st_union function for the geom to handle situation like following . It will first make sure geom is valid and then perform union on the geom and applies buffer with tolerance 0.005 , which is negligible ( mainly to make sure we are not dealing with too many points and it will make postgres search query faster )

Consideration :

This could have been done with shapely , geopandas or any other geospatial libraries , since we are doing query directly on postgis , I preferred doing it in database level which will benefit us computation wise. Convex hull is also a good option within postgis but convex hull try to produce enclosing polygon , for our usecase union turns out ideal cause it can omit unnecessary parts specially if polygon is curve or C shaped thats why I opted for ST_UNION

image

Above input on query will result like following after geometrycheck , union and buffer

image

@kshitijrajsharma kshitijrajsharma merged commit 9e20af4 into develop Jan 12, 2024
9 checks passed
@kshitijrajsharma kshitijrajsharma deleted the enhance/task_limits_and_query branch January 19, 2024 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant