public void CanCheckPolyline() { IPolyline line = GeometryFactory.CreatePolyline(0, 100, 1000, 10, 100, 1010); line.SpatialReference = CreateSpatialReference(); line.SnapToSpatialReference(); // to allow check for double equality AssertFulfilled("NOT $ISCLOSED", line); AssertFulfilled("$CIRCULARARCCOUNT = 0", line); AssertFulfilled("$ELLIPTICARCCOUNT = 0", line); AssertFulfilled("$BEZIERCOUNT = 0", line); AssertFulfilled("$SEGMENTCOUNT = 1", line); AssertFulfilled("$LINEARSEGMENTCOUNT = 1", line); AssertFulfilled("$NONLINEARSEGMENTCOUNT = 0", line); AssertFulfilled("$PARTCOUNT = 1", line); AssertFulfilled("$VERTEXCOUNT = 2", line); AssertFulfilled("NOT $ISMULTIPART", line); AssertFulfilled("$AREA = 0", line); AssertFulfilled("$LENGTH = 10", line); AssertFulfilled("$SLIVERRATIO IS NULL", line); AssertFulfilled("$DIMENSION = 1", line); AssertFulfilled("$INTERIORRINGCOUNT = 0", line); AssertFulfilled("$EXTERIORRINGCOUNT = 0", line); AssertFulfilled("$RINGCOUNT = 0", line); AssertFulfilled("$TRIANGLEFANCOUNT = 0", line); AssertFulfilled("$TRIANGLESTRIPCOUNT = 0", line); AssertFulfilled("$TRIANGLESPATCHCOUNT = 0", line); AssertFulfilled("NOT $ISEXTERIORRING", line); AssertFulfilled("NOT $ISINTERIORRING", line); AssertFulfilled("$XMIN = 0", line); AssertFulfilled("$YMIN = 100", line); AssertFulfilled("$XMAX = 10", line); AssertFulfilled("$YMAX = 100", line); AssertFulfilled("$ZMIN = 1000", line); AssertFulfilled("$ZMAX = 1010", line); AssertFulfilled("$MMIN IS NULL", line); AssertFulfilled("$MMAX IS NULL", line); AssertFulfilled("$UNDEFINEDMVALUECOUNT = 2", line); AssertFulfilled("$CONTROLPOINTCOUNT = 0", line); AssertFulfilled("1 = 1", line); AssertFulfilled(" ", line); AssertNotFulfilled("1 = 2", line); AssertNotFulfilled("$AREA > 200 AND $LENGTH > 30", line); AssertNotFulfilled("$SLIVERRATIO > 100", line); AssertFulfilled("NOT ($ISCLOSED AND $CIRCULARARCCOUNT = 1 AND $SEGMENTCOUNT = 1)", line); }
public void CanCheckPolylineMValues() { IPolyline line = GeometryFactory.CreatePolyline(0, 100, 1000, 10, 100, 1010); line.SpatialReference = CreateSpatialReference(); GeometryUtils.MakeMAware(line); ((IMSegmentation)line).SetMsAsDistance(asRatio: true); line.SnapToSpatialReference(); // to allow check for double equality AssertFulfilled("$MMIN = 0", line); AssertFulfilled("$MMAX = 1", line); AssertFulfilled("$UNDEFINEDMVALUECOUNT = 0", line); }
public void CanCheckPolylineControlPoints() { IPolyline line = GeometryFactory.CreatePolyline(0, 100, 1000, 10, 100, 1010); line.SpatialReference = CreateSpatialReference(); GeometryUtils.MakePointIDAware(line); const int vertexIdx = 1; IPoint point = ((IPointCollection)line).Point[vertexIdx]; point.ID = 1; ((IPointCollection)line).UpdatePoint(vertexIdx, point); line.SnapToSpatialReference(); // to allow check for double equality AssertFulfilled("$CONTROLPOINTCOUNT = 1", line); }