Ejemplo n.º 1
0
 public virtual void OffsetPolygon_(double distance, com.esri.core.geometry.OperatorOffset.JoinType
                                    joins)
 {
     com.esri.core.geometry.Polygon polygon = new com.esri.core.geometry.Polygon();
     polygon.startPath(0, 0);
     polygon.lineTo(0, 16);
     polygon.lineTo(16, 16);
     polygon.lineTo(16, 11);
     polygon.lineTo(10, 10);
     polygon.lineTo(10, 12);
     polygon.lineTo(3, 12);
     polygon.lineTo(3, 4);
     polygon.lineTo(10, 4);
     polygon.lineTo(10, 6);
     polygon.lineTo(16, 5);
     polygon.lineTo(16, 0);
     com.esri.core.geometry.OperatorOffset offset = (com.esri.core.geometry.OperatorOffset
                                                     )com.esri.core.geometry.OperatorFactoryLocal.getInstance().getOperator(com.esri.core.geometry.Operator.Type
                                                                                                                            .Offset);
     com.esri.core.geometry.Geometry outputGeom = offset.execute(polygon, null, distance
                                                                 , joins, 2, 0, null);
     NUnit.Framework.Assert.IsNotNull(outputGeom);
     if (distance > 2)
     {
         NUnit.Framework.Assert.IsTrue(outputGeom.isEmpty());
     }
 }
Ejemplo n.º 2
0
 public virtual void OffsetPolyline_(double distance, com.esri.core.geometry.OperatorOffset.JoinType
                                     joins)
 {
     com.esri.core.geometry.Polyline polyline = new com.esri.core.geometry.Polyline();
     polyline.startPath(0, 0);
     polyline.lineTo(6, 0);
     polyline.lineTo(6, 1);
     polyline.lineTo(4, 1);
     polyline.lineTo(4, 2);
     polyline.lineTo(10, 2);
     com.esri.core.geometry.OperatorOffset offset = (com.esri.core.geometry.OperatorOffset
                                                     )com.esri.core.geometry.OperatorFactoryLocal.getInstance().getOperator(com.esri.core.geometry.Operator.Type
                                                                                                                            .Offset);
     com.esri.core.geometry.Geometry outputGeom = offset.execute(polyline, null, distance
                                                                 , joins, 2, 0, null);
     NUnit.Framework.Assert.IsNotNull(outputGeom);
 }