From 317c0cb83951a07cda726d36924673545ede32e5 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Fri, 28 Sep 2012 22:51:06 +0000 Subject: [PATCH] Remove unused point in poly function git-svn-id: http://svn.osgeo.org/postgis/trunk@10343 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/liblwgeom.h.in | 1 - liblwgeom/measures.c | 28 ---------------------------- 2 files changed, 29 deletions(-) diff --git a/liblwgeom/liblwgeom.h.in b/liblwgeom/liblwgeom.h.in index 147d2da1f..20e5e864e 100644 --- a/liblwgeom/liblwgeom.h.in +++ b/liblwgeom/liblwgeom.h.in @@ -1083,7 +1083,6 @@ extern double ptarray_length(const POINTARRAY *pts); extern int pt_in_ring_2d(const POINT2D *p, const POINTARRAY *ring); -extern int pt_in_poly_2d(const POINT2D *p, const LWPOLY *poly); extern int azimuth_pt_pt(const POINT2D *p1, const POINT2D *p2, double *ret); extern int lwpoint_inside_circle(const LWPOINT *p, double cx, double cy, double rad); extern void lwgeom_reverse(LWGEOM *lwgeom); diff --git a/liblwgeom/measures.c b/liblwgeom/measures.c index f42cf2eb0..4bcd29fa5 100644 --- a/liblwgeom/measures.c +++ b/liblwgeom/measures.c @@ -1861,34 +1861,6 @@ End of Functions in common for Brute force and new calculation --------------------------------------------------------------------------------------------------------------*/ -/*Mixed functions*/ - - -/** - - true if point is in poly (and not in its holes) - It's not used by postgis but since I don't know what else - can be affectes in the world I don't dare removing it. - */ -int -pt_in_poly_2d(const POINT2D *p, const LWPOLY *poly) -{ - int i; - - /* Not in outer ring */ - if ( ! pt_in_ring_2d(p, poly->rings[0]) ) return 0; - - /* Check holes */ - for (i=1; inrings; i++) - { - /* Inside a hole */ - if ( pt_in_ring_2d(p, poly->rings[i]) ) return 0; - } - - return 1; /* In outer ring, not in holes */ -} - - /** The old function nessecary for ptarray_segmentize2d in ptarray.c */ -- 2.50.1