]> granicus.if.org Git - postgis/commitdiff
Rename parser_check_flags to unparser_check_flags for the unparser to prevent linking...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sat, 27 Sep 2008 08:19:18 +0000 (08:19 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sat, 27 Sep 2008 08:19:18 +0000 (08:19 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3021 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwgunparse.c
lwgeom/lwgeom_functions_analytic.c

index fe1dcda155feef2403832cf641d67c5ab6466b7d..629e85cd659e45defdbe4061008852d1a3d56415 100644 (file)
@@ -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;
index 138054fedfd2bb129a2dcc8125c1c6c4244b47a2..0f6a1fd7040ec89ec3b255b71f3d740da36b4db6 100644 (file)
@@ -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);