[mapserver-commits] r10814 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Dec 23 11:02:26 EST 2010
Author: sdlime
Date: 2010-12-23 08:02:26 -0800 (Thu, 23 Dec 2010)
New Revision: 10814
Modified:
trunk/mapserver/mapprimitive.c
trunk/mapserver/mapserver.h
Log:
Move isOuterRing() to msIsOuterRing() so it can be used more widely.
Modified: trunk/mapserver/mapprimitive.c
===================================================================
--- trunk/mapserver/mapprimitive.c 2010-12-22 19:07:34 UTC (rev 10813)
+++ trunk/mapserver/mapprimitive.c 2010-12-23 16:02:26 UTC (rev 10814)
@@ -212,7 +212,7 @@
}
/* checks to see if ring r is an outer ring of shape */
-static int isOuterRing(shapeObj *shape, int r)
+int msIsOuterRing(shapeObj *shape, int r)
{
int i, status=MS_TRUE;
int result1, result2;
@@ -254,7 +254,7 @@
MS_CHECK_ALLOC(list, sizeof(int)*shape->numlines, NULL);
for(i=0; i<shape->numlines; i++)
- list[i] = isOuterRing(shape, i);
+ list[i] = msIsOuterRing(shape, i);
return(list);
}
@@ -1207,7 +1207,7 @@
double area=0;
for(i=0; i<p->numlines; i++) {
- if(isOuterRing(p, i))
+ if(msIsOuterRing(p, i))
area += getRingArea(&(p->line[i]));
else
area -= getRingArea(&(p->line[i])); /* hole */
Modified: trunk/mapserver/mapserver.h
===================================================================
--- trunk/mapserver/mapserver.h 2010-12-22 19:07:34 UTC (rev 10813)
+++ trunk/mapserver/mapserver.h 2010-12-23 16:02:26 UTC (rev 10814)
@@ -1957,6 +1957,7 @@
MS_DLL_EXPORT void msInitShape(shapeObj *shape);
MS_DLL_EXPORT void msShapeDeleteLine( shapeObj *shape, int line );
MS_DLL_EXPORT int msCopyShape(shapeObj *from, shapeObj *to);
+MS_DLL_EXPORT int msIsOuterRing(shapeObj *shape, int r);
MS_DLL_EXPORT int *msGetOuterList(shapeObj *shape);
MS_DLL_EXPORT int *msGetInnerList(shapeObj *shape, int r, int *outerlist);
MS_DLL_EXPORT void msComputeBounds(shapeObj *shape);
More information about the mapserver-commits
mailing list