[postgis-commits] svn - r3021 - in trunk: liblwgeom lwgeom
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Sat Sep 27 01:19:18 PDT 2008
Author: mcayland
Date: 2008-09-27 01:19:18 -0700 (Sat, 27 Sep 2008)
New Revision: 3021
Modified:
trunk/liblwgeom/lwgunparse.c
trunk/lwgeom/lwgeom_functions_analytic.c
Log:
Rename parser_check_flags to unparser_check_flags for the unparser to prevent linking error under OS X. Also add missing function prototype to silence compiler warning in the PiP code.
Modified: trunk/liblwgeom/lwgunparse.c
===================================================================
--- trunk/liblwgeom/lwgunparse.c 2008-09-26 21:46:23 UTC (rev 3020)
+++ trunk/liblwgeom/lwgunparse.c 2008-09-27 08:19:18 UTC (rev 3021)
@@ -79,7 +79,7 @@
* Parser global check flags - a bitmap of flags that determine which checks the parser will perform
* (see liblwgeom.h for the related PARSER_CHECK constants)
*/
-int parser_check_flags;
+int unparser_check_flags;
/*---------------------------------------------------------- */
@@ -239,7 +239,7 @@
int cnt = read_int(&geom);
/* Ensure that LINESTRING has a minimum of 2 points */
- if ((parser_check_flags & PARSER_CHECK_MINPOINTS) && cnt < 2)
+ if ((unparser_check_flags & PARSER_CHECK_MINPOINTS) && cnt < 2)
lwerror("geometry requires more points");
if ( cnt == 0 ){
@@ -304,7 +304,7 @@
/* Check if they are the same... */
if (memcmp(&first_point, &last_point, sizeof(double) * dims) &&
- (parser_check_flags & PARSER_CHECK_CLOSURE))
+ (unparser_check_flags & PARSER_CHECK_CLOSURE))
lwerror("geometry contains non-closed rings");
}
@@ -318,11 +318,11 @@
int cnt = read_int(&geom);
/* Ensure that a CIRCULARSTRING has a minimum of 3 points */
- if ((parser_check_flags & PARSER_CHECK_MINPOINTS) && cnt < 3)
+ if ((unparser_check_flags & PARSER_CHECK_MINPOINTS) && cnt < 3)
lwerror("geometry requires more points");
/* Ensure that a CIRCULARSTRING has an odd number of points */
- if ((parser_check_flags & PARSER_CHECK_ODD) && cnt % 2 != 1)
+ if ((unparser_check_flags & PARSER_CHECK_ODD) && cnt % 2 != 1)
lwerror("geometry must have an odd number of points");
if ( cnt == 0 ){
@@ -575,7 +575,7 @@
return NULL;
/* Setup the inital parser flags */
- parser_check_flags = flags;
+ unparser_check_flags = flags;
local_malloc=alloc;
local_free=free;
@@ -700,7 +700,7 @@
LWDEBUGF(2, "output_wkb_line_collection: %d iterations loop", cnt);
/* Ensure that LINESTRING has a minimum of 2 points */
- if ((parser_check_flags & PARSER_CHECK_MINPOINTS) && cnt < 2)
+ if ((unparser_check_flags & PARSER_CHECK_MINPOINTS) && cnt < 2)
lwerror("geometry requires more points");
write_wkb_int(cnt);
@@ -747,7 +747,7 @@
/* Check if they are the same... */
if (memcmp(&first_point, &last_point, sizeof(double) * dims) &&
- (parser_check_flags & PARSER_CHECK_CLOSURE))
+ (unparser_check_flags & PARSER_CHECK_CLOSURE))
lwerror("geometry contains non-closed rings");
return geom;
@@ -771,11 +771,11 @@
LWDEBUGF(2, "output_wkb_curve_collection: %d iterations loop", cnt);
/* Ensure that a CIRCULARSTRING has a minimum of 3 points */
- if ((parser_check_flags & PARSER_CHECK_MINPOINTS) && cnt < 3)
+ if ((unparser_check_flags & PARSER_CHECK_MINPOINTS) && cnt < 3)
lwerror("geometry requires more points");
/* Ensure that a CIRCULARSTRING has an odd number of points */
- if ((parser_check_flags & PARSER_CHECK_ODD) && cnt % 2 != 1)
+ if ((unparser_check_flags & PARSER_CHECK_ODD) && cnt % 2 != 1)
lwerror("geometry must have an odd number of points");
write_wkb_int(cnt);
@@ -882,7 +882,7 @@
return NULL;
/* Setup the inital parser flags */
- parser_check_flags = flags;
+ unparser_check_flags = flags;
local_malloc=alloc;
local_free=free;
Modified: trunk/lwgeom/lwgeom_functions_analytic.c
===================================================================
--- trunk/lwgeom/lwgeom_functions_analytic.c 2008-09-26 21:46:23 UTC (rev 3020)
+++ trunk/lwgeom/lwgeom_functions_analytic.c 2008-09-27 08:19:18 UTC (rev 3021)
@@ -41,6 +41,7 @@
int point_in_ring(RTREE_NODE *root, POINT2D *point);
int point_in_ring_deprecated(POINTARRAY *pts, POINT2D *point);
int point_in_polygon(RTREE_NODE **root, int ringCount, LWPOINT *point);
+int point_in_multipolygon(RTREE_NODE **root, int polyCount, int ringCount, LWPOINT *point);
int point_in_polygon_deprecated(LWPOLY *polygon, LWPOINT *point);
int point_outside_polygon(RTREE_NODE **root, int ringCount, LWPOINT *point);
int point_outside_polygon_deprecated(LWPOLY *polygon, LWPOINT *point);
More information about the postgis-commits
mailing list