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

Curved geometries: Implement length, area, point-in-polygon testing #1111

Closed
wants to merge 0 commits into from

Conversation

dbaston
Copy link
Member

@dbaston dbaston commented Jun 14, 2024

This PR extends implements getLength() and getArea() methods for curved geometry types. It also extends SimplePointInAreaLocator and RayCrossingCounter to handle rings defined by a combination of line segments and circular arcs (as in CompoundCurve geometries).

The PIP functionality is not yet exposed in the Geometry API. This could either be done by adding a special case to Geometry::intersects or by allowing PreparedGeometry to be constructed from curved geometries. To do this, IndexedPointInAreaLocator would also need to support curved geometries. I'm not sure if this is actually useful for real datasets that use curved geometries, which I'd imagine to more commonly be smaller regions like tax parcels rather than the large polygons that drive the need for IndexedPointInAreaLocator.

The RayCrossingCounter work relies on computing the intersection points between arcs and a horizontal ray so it is not as robust as the linear version, but it should be an improvement over the alternative of linearizing the arcs.

@dbaston dbaston force-pushed the curve-pip branch 5 times, most recently from 85e6830 to f7f47c5 Compare June 20, 2024 21:34
@dbaston dbaston changed the title RayCrossingCounter: Support rings defined by circular arcs [WIP] Curved geometries: Implement length, area, point-in-polygon testing Jun 21, 2024
@dbaston dbaston added the Enhancement New feature or feature improvement. label Jun 21, 2024
@dbaston dbaston force-pushed the curve-pip branch 2 times, most recently from 4586861 to 31a8f8a Compare July 18, 2024 01:31
@mwtoews
Copy link
Contributor

mwtoews commented Aug 14, 2024

@dbaston is this feature planned for 3.13.0?

@dbaston
Copy link
Member Author

dbaston commented Aug 15, 2024

@mwtoews I will rebase it to fix the conflict and then merge it if there are no objections (@pramsey , @dr-jts ?)

dbaston referenced this pull request Aug 15, 2024
…dicates and relate matrix calculations.

* No new functions, just rework of existing functionality
* "Prepared" mode now available for all predicates and relate matrix
* CAPI functions GEOSPreparedRelate and GEOSPreparedRelatePattern expose new functionality
* CAPI implementations of GEOSPreparedTouches, etc, that were previously defaulting into non-prepared implementations now default into the RelateNG prepared implementation
* Prepared implementations for Intersects, Covers, still use the older implementations
* https://lin-ear-th-inking.blogspot.com/2024/05/jts-topological-relationships-next.html
* https://lin-ear-th-inking.blogspot.com/2024/05/relateng-performance.html
@pramsey
Copy link
Member

pramsey commented Aug 15, 2024

Is this targeting 3.13?

@dbaston
Copy link
Member Author

dbaston commented Aug 15, 2024

Is this targeting 3.13?

Unless there's reason not to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or feature improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants