Frequently asked question
Note:
For polygons, the default value of 4 may cause confusion because MOLE expects all polygons to be closed polygons (for example, that IPolygonClose() is called on the geometry). This implies that all of these closed polygons have a minimum of 4 points, where the endpoint is at the start point.
For example, for a support by fire position graphic, G*GPOAS*******X, the standard specifies four anchor points, but MOLE requires five points; the fifth point closes the polygon and is positioned on the start point.
Code:
The following example (as pseudo code) shows how one might implement this substitution (for zero):
IGeometryLimits geoLimits = graphicDef as IGeometryLimits;
int minNumberOfPoints = geoLimits.MinPointCount;
int maxNumberOfPoints = geoLimits.MaxPointCount;
int nGeoType = geoLimits.GeometryType;
if (nGeoType == 1) // Point
{
// min/maxNumberOfPoints do not need to be checked for points
minNumberOfPoints = 1;
maxNumberOfPoints = 1;
}
else if (nGeoType == 3) // Line
{
if (minNumberOfPoints == 0)
minNumberOfPoints = 2;
if (maxNumberOfPoints == 0)
maxNumberOfPoints = INFINITY_TAG; // Tag for no bound
}
else if (nGeoType == 4) // Polygon/Area
{
if (minNumberOfPoints == 0)
minNumberOfPoints = 4; // Minimum of 4 points in a *closed* polygon
if (maxNumberOfPoints == 0)
maxNumberOfPoints = INFINITY_TAG; // Tag for no bound
}
Article ID: 000010327
Get help from ArcGIS experts
Download the Esri Support App