From: Mark Cave-Ayland Date: Sat, 27 Sep 2008 08:19:18 +0000 (+0000) Subject: Rename parser_check_flags to unparser_check_flags for the unparser to prevent linking... X-Git-Tag: 1.4.0b1~691 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ddc7e96a1d5431c86ea5318117cd9d3787b2bdc0;p=postgis 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. git-svn-id: http://svn.osgeo.org/postgis/trunk@3021 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwgunparse.c b/liblwgeom/lwgunparse.c index fe1dcda15..629e85cd6 100644 --- a/liblwgeom/lwgunparse.c +++ b/liblwgeom/lwgunparse.c @@ -79,7 +79,7 @@ void (*write_wkb_bytes)(uchar* ptr,unsigned int cnt,size_t size); * 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 @@ output_line_collection(uchar* geom,outfunc func,int supress) 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 @@ output_polygon_ring_collection(uchar* geom,outfunc func,int supress) /* 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 @@ output_curve_collection(uchar* geom,outfunc func,int supress) 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 @@ unparse_WKT(uchar* serialized, allocator alloc, freeor free, int flags) 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 @@ output_wkb_line_collection(uchar* geom,outwkbfunc func) 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 @@ output_wkb_polygon_ring_collection(uchar* geom,outwkbfunc func) /* 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 @@ output_wkb_curve_collection(uchar* geom,outwkbfunc func) 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 @@ unparse_WKB(uchar* serialized, allocator alloc, freeor free, int flags, char end return NULL; /* Setup the inital parser flags */ - parser_check_flags = flags; + unparser_check_flags = flags; local_malloc=alloc; local_free=free; diff --git a/lwgeom/lwgeom_functions_analytic.c b/lwgeom/lwgeom_functions_analytic.c index 138054fed..0f6a1fd70 100644 --- a/lwgeom/lwgeom_functions_analytic.c +++ b/lwgeom/lwgeom_functions_analytic.c @@ -41,6 +41,7 @@ int isOnSegment(POINT2D *seg1, POINT2D *seg2, POINT2D *point); 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);