Ticket #846 (closed enhancement: wontfix)
Cleaning up around and enhance point in polygon tests around the code
| Reported by: | nicklas | Owned by: | nicklas |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 2.1.0 |
| Component: | postgis | Version: | trunk |
| Keywords: | Cc: |
Description
Today we have four different point in ring tests.
geographic and 3D we leave separate, but the two others can be merged.
pt_in_ring_2d in liblwgeom/measures.c and (counting crossing)
point_in_ring in postgis/lwgeom_functions_analytic.c (counting winding)
they do the same thing in different ways with quite differnt api.
I would like to enhance point_in_ring by reducing the calculations for segments strict above or strict below the point, and then adjust the distance functions to also use this function after moving it to lilwgeom library.
Today pt_in_ring_2d outputs 0 for point outside ring and 1 for point inside.
point_in_ring outputs 1 for point in ring, -1 for opint outside ring and 0 for point on boundary.
