geowave
geowave copied to clipboard
Add intersects with % overlap query functionality
Add the ability for a user to run an intersects query where results are only returned if the area of intersection between the result geometry and the query geometry is greater than or equal to some user-specified percentage of the total area of the result geometry.
This could potentially be added as a custom, GeoWave-specific ECQL method:
INTERSECTS_PERCENT(the_geom, "POLYGON((...))", 30)
- In this case, the_geom will be returned if the area of the intersection between the_geom and the WKT polygon is greater than or equal to 30% of the original area of the_geom.
INTERSECTS_PERCENT("POLYGON((...))"), the_geom, 30)
- This case is almost the same as the one above, but now we're generating the area ratio using the WKT polygon.
You could also add support for a "less than" relationship by negating the percent value.
INTERSECTS_PERCENT(the_geom, "POLYGON((...))", -30)
- Now we only return if the area ratio is less than 30%.
You could also just do something like this INTERSECTS_PERCENT(the_geom, "POLYGON((...))") BETWEEN 20 AND 30
- Now you're saying that the percentage of the intersection area compared to the original area will be between 20 and 30
- Doing it this way is probably a little more flexible