public static void Test5()
		{
			com.esri.core.geometry.Polygon poly = new com.esri.core.geometry.Polygon();
			poly.StartPath(0, 0);
			poly.LineTo(0, 1);
			poly.LineTo(1, 1);
			poly.LineTo(1, 0);
			poly.StartPath(2, 0);
			poly.LineTo(2, 1);
			poly.LineTo(3, 1);
			poly.LineTo(3, 0);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0, 1);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 3, 0, 3);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 6, 0, 1);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 5, 0, 4);
			poly.InterpolateAttributes(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 3, 1);
			poly.InterpolateAttributes(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 1, 3);
			poly.InterpolateAttributes(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 2, 1);
			NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0) == 2);
			NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0) == 1);
			NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0) == 2);
			NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 3, 0) == 3);
			NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 4, 0) == 3);
			NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 5, 0) == 4);
			NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 6, 0) == 1);
			NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 7, 0) == 2);
		}
		public static void TestEditShape_()
		{
			{
				// std::shared_ptr<Esri_runtimecore::Geometry::Polygon> poly_base_6
				// = std::make_shared<Esri_runtimecore::Geometry::Polygon>();
				// Single part polygon
				com.esri.core.geometry.Polygon poly = new com.esri.core.geometry.Polygon();
				poly.StartPath(10, 10);
				poly.LineTo(10, 12);
				poly.LineTo(14, 15);
				poly.LineTo(10, 11);
				com.esri.core.geometry.EditShape editShape = new com.esri.core.geometry.EditShape();
				int geom = editShape.AddGeometry(poly);
				com.esri.core.geometry.Polygon poly2 = (com.esri.core.geometry.Polygon)editShape.GetGeometry(geom);
				NUnit.Framework.Assert.IsTrue(poly.Equals(poly2));
			}
			{
				// Two part poly
				com.esri.core.geometry.Polygon poly = new com.esri.core.geometry.Polygon();
				poly.StartPath(10, 10);
				poly.LineTo(10, 12);
				poly.LineTo(14, 15);
				poly.LineTo(10, 11);
				poly.StartPath(100, 10);
				poly.LineTo(100, 12);
				poly.LineTo(14, 150);
				poly.LineTo(10, 101);
				poly.LineTo(100, 11);
				com.esri.core.geometry.EditShape editShape = new com.esri.core.geometry.EditShape();
				int geom = editShape.AddGeometry(poly);
				com.esri.core.geometry.Polygon poly2 = (com.esri.core.geometry.Polygon)editShape.GetGeometry(geom);
				NUnit.Framework.Assert.IsTrue(poly.Equals(poly2));
			}
			{
				// Single part polyline
				com.esri.core.geometry.Polyline poly = new com.esri.core.geometry.Polyline();
				poly.StartPath(10, 10);
				poly.LineTo(10, 12);
				poly.LineTo(14, 15);
				poly.LineTo(10, 11);
				com.esri.core.geometry.EditShape editShape = new com.esri.core.geometry.EditShape();
				int geom = editShape.AddGeometry(poly);
				com.esri.core.geometry.Polyline poly2 = (com.esri.core.geometry.Polyline)editShape.GetGeometry(geom);
				NUnit.Framework.Assert.IsTrue(poly.Equals(poly2));
			}
			{
				// Two part poly
				com.esri.core.geometry.Polyline poly = new com.esri.core.geometry.Polyline();
				poly.StartPath(10, 10);
				poly.LineTo(10, 12);
				poly.LineTo(14, 15);
				poly.LineTo(10, 11);
				poly.StartPath(100, 10);
				poly.LineTo(100, 12);
				poly.LineTo(14, 150);
				poly.LineTo(10, 101);
				poly.LineTo(100, 11);
				com.esri.core.geometry.EditShape editShape = new com.esri.core.geometry.EditShape();
				int geom = editShape.AddGeometry(poly);
				com.esri.core.geometry.Polyline poly2 = (com.esri.core.geometry.Polyline)editShape.GetGeometry(geom);
				NUnit.Framework.Assert.IsTrue(poly.Equals(poly2));
			}
			{
				// Five part poly. Close one of parts to test if it works.
				com.esri.core.geometry.Polyline poly = new com.esri.core.geometry.Polyline();
				poly.StartPath(10, 10);
				poly.LineTo(10, 12);
				poly.LineTo(14, 15);
				poly.LineTo(10, 11);
				poly.StartPath(100, 10);
				poly.LineTo(100, 12);
				poly.LineTo(14, 150);
				poly.LineTo(10, 101);
				poly.LineTo(100, 11);
				poly.StartPath(1100, 101);
				poly.LineTo(1300, 132);
				poly.LineTo(144, 150);
				poly.LineTo(106, 1051);
				poly.LineTo(1600, 161);
				poly.StartPath(100, 190);
				poly.LineTo(1800, 192);
				poly.LineTo(184, 8150);
				poly.LineTo(1080, 181);
				poly.StartPath(1030, 10);
				poly.LineTo(1300, 132);
				poly.LineTo(314, 3150);
				poly.LineTo(310, 1301);
				poly.LineTo(3100, 311);
				com.esri.core.geometry.EditShape editShape = new com.esri.core.geometry.EditShape();
				int geom = editShape.AddGeometry(poly);
				editShape.SetClosedPath(editShape.GetNextPath(editShape.GetFirstPath(geom)), true);
				((com.esri.core.geometry.MultiPathImpl)poly._getImpl()).ClosePathWithLine(1);
				com.esri.core.geometry.Polyline poly2 = (com.esri.core.geometry.Polyline)editShape.GetGeometry(geom);
				NUnit.Framework.Assert.IsTrue(poly.Equals(poly2));
			}
			{
				// Test erase
				com.esri.core.geometry.Polyline poly = new com.esri.core.geometry.Polyline();
				poly.StartPath(10, 10);
				poly.LineTo(10, 12);
				poly.LineTo(314, 3150);
				poly.LineTo(310, 1301);
				poly.LineTo(3100, 311);
				com.esri.core.geometry.EditShape editShape = new com.esri.core.geometry.EditShape();
				int geom = editShape.AddGeometry(poly);
				int vertex = editShape.GetFirstVertex(editShape.GetFirstPath(geom));
				vertex = editShape.RemoveVertex(vertex, true);
				vertex = editShape.GetNextVertex(vertex);
				editShape.RemoveVertex(vertex, true);
				com.esri.core.geometry.Polyline poly2 = (com.esri.core.geometry.Polyline)editShape.GetGeometry(geom);
				poly.SetEmpty();
				poly.StartPath(10, 12);
				poly.LineTo(310, 1301);
				poly.LineTo(3100, 311);
				NUnit.Framework.Assert.IsTrue(poly.Equals(poly2));
			}
			{
				// Test erase
				com.esri.core.geometry.Polygon poly = new com.esri.core.geometry.Polygon();
				poly.StartPath(10, 10);
				poly.LineTo(10, 12);
				poly.LineTo(314, 3150);
				poly.LineTo(310, 1301);
				poly.LineTo(3100, 311);
				com.esri.core.geometry.EditShape editShape = new com.esri.core.geometry.EditShape();
				int geom = editShape.AddGeometry(poly);
				int vertex = editShape.GetFirstVertex(editShape.GetFirstPath(geom));
				vertex = editShape.RemoveVertex(vertex, true);
				vertex = editShape.GetNextVertex(vertex);
				editShape.RemoveVertex(vertex, true);
				com.esri.core.geometry.Polygon poly2 = (com.esri.core.geometry.Polygon)editShape.GetGeometry(geom);
				poly.SetEmpty();
				poly.StartPath(10, 12);
				poly.LineTo(310, 1301);
				poly.LineTo(3100, 311);
				NUnit.Framework.Assert.IsTrue(poly.Equals(poly2));
			}
			{
				// Test Filter Close Points
				com.esri.core.geometry.Polygon poly = new com.esri.core.geometry.Polygon();
				poly.StartPath(10, 10);
				poly.LineTo(10, 10.001);
				poly.LineTo(10.001, 10);
				com.esri.core.geometry.EditShape editShape = new com.esri.core.geometry.EditShape();
				int geom = editShape.AddGeometry(poly);
				editShape.FilterClosePoints(0.002, true, false);
				com.esri.core.geometry.Polygon poly2 = (com.esri.core.geometry.Polygon)editShape.GetGeometry(geom);
				NUnit.Framework.Assert.IsTrue(poly2.IsEmpty());
			}
			{
				// Test Filter Close Points
				com.esri.core.geometry.Polygon poly = new com.esri.core.geometry.Polygon();
				poly.StartPath(10, 10);
				poly.LineTo(10, 10.0025);
				poly.LineTo(11.0, 10);
				com.esri.core.geometry.EditShape editShape = new com.esri.core.geometry.EditShape();
				int geom = editShape.AddGeometry(poly);
				editShape.FilterClosePoints(0.002, true, false);
				com.esri.core.geometry.Polygon poly2 = (com.esri.core.geometry.Polygon)editShape.GetGeometry(geom);
				NUnit.Framework.Assert.IsTrue(!poly2.IsEmpty());
			}
			{
				// Test Filter Close Points
				com.esri.core.geometry.Polygon poly = new com.esri.core.geometry.Polygon();
				poly.StartPath(10, 10);
				poly.LineTo(10, 10.001);
				poly.LineTo(11.0, 10);
				com.esri.core.geometry.EditShape editShape = new com.esri.core.geometry.EditShape();
				int geom = editShape.AddGeometry(poly);
				editShape.FilterClosePoints(0.002, true, false);
				com.esri.core.geometry.Polygon poly2 = (com.esri.core.geometry.Polygon)editShape.GetGeometry(geom);
				NUnit.Framework.Assert.IsTrue(poly2.IsEmpty());
			}
			{
				// Test attribute splitting 1
				com.esri.core.geometry.Polyline polyline = new com.esri.core.geometry.Polyline();
				polyline.StartPath(0, 0);
				polyline.LineTo(1, 1);
				polyline.LineTo(2, 2);
				polyline.LineTo(3, 3);
				polyline.LineTo(4, 4);
				polyline.StartPath(5, 5);
				polyline.LineTo(6, 6);
				polyline.LineTo(7, 7);
				polyline.LineTo(8, 8);
				polyline.LineTo(9, 9);
				polyline.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 4);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 1, 0, 8);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 2, 0, 12);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 3, 0, 16);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 4, 0, 20);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 5, 0, 22);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 6, 0, 26);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 7, 0, 30);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 8, 0, 34);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 9, 0, 38);
				com.esri.core.geometry.EditShape shape = new com.esri.core.geometry.EditShape();
				int geometry = shape.AddGeometry(polyline);
				com.esri.core.geometry.AttributeStreamOfInt32 vertex_handles = new com.esri.core.geometry.AttributeStreamOfInt32(0);
				for (int path = shape.GetFirstPath(geometry); path != -1; path = shape.GetNextPath(path))
				{
					for (int vertex = shape.GetFirstVertex(path); vertex != -1; vertex = shape.GetNextVertex(vertex))
					{
						if (vertex != shape.GetLastVertex(path))
						{
							vertex_handles.Add(vertex);
						}
					}
				}
				double[] t = new double[1];
				for (int i = 0; i < vertex_handles.Size(); i++)
				{
					int vertex = vertex_handles.Read(i);
					t[0] = 0.5;
					shape.SplitSegment(vertex, t, 1);
				}
				com.esri.core.geometry.Polyline chopped_polyline = (com.esri.core.geometry.Polyline)shape.GetGeometry(geometry);
				NUnit.Framework.Assert.IsTrue(chopped_polyline.GetPointCount() == 18);
				double att_ = 4;
				for (int i_1 = 0; i_1 < 18; i_1++)
				{
					double att = chopped_polyline.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, i_1, 0);
					NUnit.Framework.Assert.IsTrue(att == att_);
					att_ += 2;
				}
			}
			{
				// Test attribute splitting 2
				com.esri.core.geometry.Polyline line1 = new com.esri.core.geometry.Polyline();
				com.esri.core.geometry.Polyline line2 = new com.esri.core.geometry.Polyline();
				line1.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.M);
				line2.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.M);
				line1.StartPath(0, 0);
				line1.LineTo(10, 10);
				line2.StartPath(10, 0);
				line2.LineTo(0, 10);
				line1.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0, 7);
				line1.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0, 17);
				line2.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0, 5);
				line2.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0, 15);
				com.esri.core.geometry.EditShape shape = new com.esri.core.geometry.EditShape();
				int g1 = shape.AddGeometry(line1);
				int g2 = shape.AddGeometry(line2);
				com.esri.core.geometry.CrackAndCluster.Execute(shape, 0.001, null, true);
				com.esri.core.geometry.Polyline chopped_line1 = (com.esri.core.geometry.Polyline)shape.GetGeometry(g1);
				com.esri.core.geometry.Polyline chopped_line2 = (com.esri.core.geometry.Polyline)shape.GetGeometry(g2);
				double att1 = chopped_line1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0);
				double att2 = chopped_line2.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0);
				NUnit.Framework.Assert.IsTrue(att1 == 12);
				NUnit.Framework.Assert.IsTrue(att2 == 10);
			}
			{
				// Test attribute splitting 3
				com.esri.core.geometry.Polygon polygon = new com.esri.core.geometry.Polygon();
				polygon.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.M);
				polygon.StartPath(0, 0);
				polygon.LineTo(0, 10);
				polygon.LineTo(10, 10);
				polygon.LineTo(10, 0);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0, 7);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0, 17);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0, 23);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 3, 0, 43);
				com.esri.core.geometry.EditShape shape = new com.esri.core.geometry.EditShape();
				int geometry = shape.AddGeometry(polygon);
				com.esri.core.geometry.AttributeStreamOfInt32 vertex_handles = new com.esri.core.geometry.AttributeStreamOfInt32(0);
				int start_v = shape.GetFirstVertex(shape.GetFirstPath(geometry));
				int v = start_v;
				do
				{
					vertex_handles.Add(v);
					v = shape.GetNextVertex(v);
				}
				while (v != start_v);
				double[] t = new double[1];
				for (int i = 0; i < vertex_handles.Size(); i++)
				{
					int v1 = vertex_handles.Read(i);
					t[0] = 0.5;
					shape.SplitSegment(v1, t, 1);
				}
				com.esri.core.geometry.Polygon cut_polygon = (com.esri.core.geometry.Polygon)shape.GetGeometry(geometry);
				NUnit.Framework.Assert.IsTrue(cut_polygon.GetPointCount() == 8);
				com.esri.core.geometry.Point2D pt0 = cut_polygon.GetXY(0);
				double a0 = cut_polygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0);
				NUnit.Framework.Assert.IsTrue(a0 == 25);
				com.esri.core.geometry.Point2D pt1 = cut_polygon.GetXY(1);
				double a1 = cut_polygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0);
				NUnit.Framework.Assert.IsTrue(a1 == 7);
				com.esri.core.geometry.Point2D pt2 = cut_polygon.GetXY(2);
				double a2 = cut_polygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0);
				NUnit.Framework.Assert.IsTrue(a2 == 12);
				com.esri.core.geometry.Point2D pt3 = cut_polygon.GetXY(3);
				double a3 = cut_polygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 3, 0);
				NUnit.Framework.Assert.IsTrue(a3 == 17);
				com.esri.core.geometry.Point2D pt4 = cut_polygon.GetXY(4);
				double a4 = cut_polygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 4, 0);
				NUnit.Framework.Assert.IsTrue(a4 == 20);
				com.esri.core.geometry.Point2D pt5 = cut_polygon.GetXY(5);
				double a5 = cut_polygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 5, 0);
				NUnit.Framework.Assert.IsTrue(a5 == 23);
				com.esri.core.geometry.Point2D pt6 = cut_polygon.GetXY(6);
				double a6 = cut_polygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 6, 0);
				NUnit.Framework.Assert.IsTrue(a6 == 33);
				com.esri.core.geometry.Point2D pt7 = cut_polygon.GetXY(7);
				double a7 = cut_polygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 7, 0);
				NUnit.Framework.Assert.IsTrue(a7 == 43);
			}
		}
		public static com.esri.core.geometry.Polygon MakePolygon2()
		{
			com.esri.core.geometry.Polygon poly = new com.esri.core.geometry.Polygon();
			poly.StartPath(0, 0);
			poly.LineTo(0, 10);
			poly.LineTo(10, 10);
			poly.LineTo(10, 0);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 2);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 1, 0, 3);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 2, 0, 5);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 3, 0, 7);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0, 2);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0, 4);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0, 8);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 3, 0, 16);
			return poly;
		}
//		/// <exception cref="org.json.JSONException"/>
//		[NUnit.Framework.Test]
//		public static void TestImportGeoJsonGeometryCollection()
//		{
//			com.esri.core.geometry.OperatorImportFromGeoJson importer = (com.esri.core.geometry.OperatorImportFromGeoJson)com.esri.core.geometry.OperatorFactoryLocal.GetInstance().GetOperator(com.esri.core.geometry.Operator.Type.ImportFromGeoJson);
//			string geoJsonString;
//			com.esri.core.geometry.Envelope2D envelope = new com.esri.core.geometry.Envelope2D();
//			com.esri.core.geometry.WktParser wktParser = new com.esri.core.geometry.WktParser();
//			geoJsonString = "{\"type\" : \"GeometryCollection\", \"geometries\" : [{\"type\" : \"Point\", \"coordinates\": [0,0]},  {\"type\" : \"GeometryCollection\" , \"geometries\" : [ {\"type\" : \"Point\", \"coordinates\" : [0, 0]} ,  {\"type\" : \"Point\", \"coordinates\" : [1, 1]} ,{ \"type\" : \"Point\", \"coordinates\" : [2, 2]}, {\"type\" : \"LineString\", \"coordinates\" :  []}]} , {\"type\" : \"Point\", \"coordinates\" : [1, 1]},  {\"type\" : \"Point\" , \"coordinates\" : [2, 2]} ] }";
//			com.esri.core.geometry.OGCStructure structure = importer.ExecuteOGC(0, geoJsonString, null).m_ogcStructure.m_structures[0];
//			NUnit.Framework.Assert.IsTrue(structure.m_type == 7);
//			NUnit.Framework.Assert.IsTrue(structure.m_structures[0].m_type == 1);
//			NUnit.Framework.Assert.IsTrue(structure.m_structures[0].m_type == 1);
//			NUnit.Framework.Assert.IsTrue(structure.m_structures[1].m_type == 7);
//			NUnit.Framework.Assert.IsTrue(structure.m_structures[2].m_type == 1);
//			NUnit.Framework.Assert.IsTrue(structure.m_structures[3].m_type == 1);
//			NUnit.Framework.Assert.IsTrue(structure.m_structures[1].m_structures[0].m_type == 1);
//			NUnit.Framework.Assert.IsTrue(structure.m_structures[1].m_structures[1].m_type == 1);
//			NUnit.Framework.Assert.IsTrue(structure.m_structures[1].m_structures[2].m_type == 1);
//			NUnit.Framework.Assert.IsTrue(structure.m_structures[1].m_structures[3].m_type == 2);
//		}
//
//		/// <exception cref="org.json.JSONException"/>
//		[NUnit.Framework.Test]
//		public static void TestImportGeoJsonMultiPolygon()
//		{
//			com.esri.core.geometry.OperatorImportFromGeoJson importerGeoJson = (com.esri.core.geometry.OperatorImportFromGeoJson)com.esri.core.geometry.OperatorFactoryLocal.GetInstance().GetOperator(com.esri.core.geometry.Operator.Type.ImportFromGeoJson);
//			com.esri.core.geometry.Polygon polygon;
//			string geoJsonString;
//			com.esri.core.geometry.Envelope2D envelope = new com.esri.core.geometry.Envelope2D();
//			// Test Import from MultiPolygon
//			geoJsonString = "{\"type\": \"Multipolygon\", \"coordinates\": []}";
//			polygon = (com.esri.core.geometry.Polygon)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Polygon, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polygon != null);
//			NUnit.Framework.Assert.IsTrue(polygon.IsEmpty());
//			NUnit.Framework.Assert.IsTrue(!polygon.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.M));
//			polygon = (com.esri.core.geometry.Polygon)(com.esri.core.geometry.GeometryEngine.GeometryFromGeoJson(geoJsonString, 0, com.esri.core.geometry.Geometry.Type.Unknown).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polygon != null);
//			NUnit.Framework.Assert.IsTrue(polygon.IsEmpty());
//			NUnit.Framework.Assert.IsTrue(!polygon.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.M));
//			geoJsonString = "{\"type\": \"Multipolygon\", \"coordinates\": [[], [[], [[10, 10, 5], [20, 10, 5], [20, 20, 5], [10, 20, 5], [10, 10, 5]], [[12, 12, 3]], [], [[10, 10, 1], [12, 12, 1]]], [], [[[90, 90, 88], [60, 90, 7], [60, 60, 7]], [], [[70, 70, 7], [80, 80, 7], [70, 80, 7], [70, 70, 7]]], []]}";
//			polygon = (com.esri.core.geometry.Polygon)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Polygon, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polygon != null);
//			polygon.QueryEnvelope2D(envelope);
//			NUnit.Framework.Assert.IsTrue(envelope.xmin == 10 && envelope.xmax == 90 && envelope.ymin == 10 && envelope.ymax == 90);
//			NUnit.Framework.Assert.IsTrue(polygon.GetPointCount() == 14);
//			NUnit.Framework.Assert.IsTrue(polygon.GetPathCount() == 5);
//			// assertTrue(polygon.calculate_area_2D() > 0.0);
//			// assertTrue(polygon.hasAttribute(VertexDescription.Semantics.Z));
//			// double z = polygon.getAttributeAsDbl(VertexDescription.Semantics.Z,
//			// 0, 0);
//			// assertTrue(z == 5);
//			// Test import Polygon
//			geoJsonString = "{\"type\": \"POLYGON\", \"coordinates\": [[], [], [[10, 10, 5], [10, 20, 5], [20, 20, 5], [20, 10, 5]], [[12, 12, 3]], [], [[10, 10, 1], [12, 12, 1]], [], [[60, 60, 7], [60, 90, 7], [90, 90, 7], [60, 60, 7]], [], [[70, 70, 7], [70, 80, 7], [80, 80, 7]], []] }";
//			polygon = (com.esri.core.geometry.Polygon)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Polygon, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polygon != null);
//			NUnit.Framework.Assert.IsTrue(polygon.GetPointCount() == 14);
//			NUnit.Framework.Assert.IsTrue(polygon.GetPathCount() == 5);
//			// assertTrue(polygon.hasAttribute(VertexDescription.Semantics.Z));
//			geoJsonString = "{\"type\": \"MULTIPOLYGON\", \"coordinates\": [[[[90, 10, 7], [10, 10, 1], [10, 90, 7], [90, 90, 1], [90, 10, 7]]]] }";
//			// ring
//			// is
//			// oriented
//			// clockwise
//			polygon = (com.esri.core.geometry.Polygon)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Polygon, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polygon != null);
//			NUnit.Framework.Assert.IsTrue(polygon.GetPointCount() == 4);
//			NUnit.Framework.Assert.IsTrue(polygon.GetPathCount() == 1);
//			// assertTrue(polygon.hasAttribute(VertexDescription.Semantics.Z));
//			NUnit.Framework.Assert.IsTrue(polygon.CalculateArea2D() > 0);
//		}
//
//		/// <exception cref="org.json.JSONException"/>
//		[NUnit.Framework.Test]
//		public static void TestImportGeoJsonMultiLineString()
//		{
//			com.esri.core.geometry.OperatorImportFromGeoJson importerGeoJson = (com.esri.core.geometry.OperatorImportFromGeoJson)com.esri.core.geometry.OperatorFactoryLocal.GetInstance().GetOperator(com.esri.core.geometry.Operator.Type.ImportFromGeoJson);
//			com.esri.core.geometry.Polyline polyline;
//			string geoJsonString;
//			com.esri.core.geometry.Envelope2D envelope = new com.esri.core.geometry.Envelope2D();
//			// Test Import from MultiLineString
//			geoJsonString = "{\"type\": \"MultiLineString\", \"coordinates\": []}";
//			polyline = (com.esri.core.geometry.Polyline)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polyline != null);
//			NUnit.Framework.Assert.IsTrue(polyline.IsEmpty());
//			NUnit.Framework.Assert.IsTrue(!polyline.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z));
//			NUnit.Framework.Assert.IsTrue(!polyline.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.M));
//			geoJsonString = "{\"type\": \"MultiLineString\", \"coordinates\": [[], [], [[10, 10, 5], [10, 20, 5], [20, 88, 5], [20, 10, 5]], [[12, 88, 3]], [], [[10, 10, 1], [12, 12, 1]], [], [[88, 60, 7], [60, 90, 7], [90, 90, 7]], [], [[70, 70, 7], [70, 80, 7], [80, 80, 7]], []]}";
//			polyline = (com.esri.core.geometry.Polyline)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polyline != null);
//			polyline.QueryEnvelope2D(envelope);
//			NUnit.Framework.Assert.IsTrue(envelope.xmin == 10 && envelope.xmax == 90 && envelope.ymin == 10 && envelope.ymax == 90);
//			NUnit.Framework.Assert.IsTrue(polyline.GetPointCount() == 14);
//			NUnit.Framework.Assert.IsTrue(polyline.GetPathCount() == 5);
//			// assertTrue(!polyline.hasAttribute(VertexDescription.Semantics.M));
//			// Test Import LineString
//			geoJsonString = "{\"type\": \"Linestring\", \"coordinates\": [[10, 10, 5], [10, 20, 5], [20, 20, 5], [20, 10, 5]]}";
//			polyline = (com.esri.core.geometry.Polyline)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polyline.GetPointCount() == 4);
//			// assertTrue(polyline.hasAttribute(VertexDescription.Semantics.Z));
//			geoJsonString = "{\"type\": \"Linestring\", \"coordinates\": [[10, 10, 5], [10, 20, 5, 3], [20, 20, 5], [20, 10, 5]]}";
//			polyline = (com.esri.core.geometry.Polyline)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polyline.GetPointCount() == 4);
//		}
//
//		// assertTrue(polyline.hasAttribute(VertexDescription.Semantics.Z));
//		// assertTrue(polyline.hasAttribute(VertexDescription.Semantics.M));
//		/// <exception cref="org.json.JSONException"/>
//		[NUnit.Framework.Test]
//		public static void TestImportGeoJsonMultiPoint()
//		{
//			com.esri.core.geometry.OperatorImportFromGeoJson importerGeoJson = (com.esri.core.geometry.OperatorImportFromGeoJson)com.esri.core.geometry.OperatorFactoryLocal.GetInstance().GetOperator(com.esri.core.geometry.Operator.Type.ImportFromGeoJson);
//			com.esri.core.geometry.MultiPoint multipoint;
//			string geoJsonString;
//			com.esri.core.geometry.Envelope2D envelope = new com.esri.core.geometry.Envelope2D();
//			// Test Import from Multi_point
//			geoJsonString = "{\"type\": \"MultiPoint\", \"coordinates\": []}";
//			multipoint = (com.esri.core.geometry.MultiPoint)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(multipoint != null);
//			NUnit.Framework.Assert.IsTrue(multipoint.IsEmpty());
//			NUnit.Framework.Assert.IsTrue(!multipoint.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z));
//			NUnit.Framework.Assert.IsTrue(!multipoint.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.M));
//			multipoint = new com.esri.core.geometry.MultiPoint();
//			multipoint.Add(118.15114354234563, 33.82234433423462345);
//			multipoint.Add(88, 88);
//			multipoint = new com.esri.core.geometry.MultiPoint();
//			multipoint.Add(88, 2);
//			multipoint.Add(88, 88);
//			geoJsonString = "{\"type\": \"Multipoint\", \"coordinates\": [[], [], [10, 88, 88, 33], [10, 20, 5, 33], [20, 20, 5, 33], [20, 10, 5, 33], [12, 12, 3, 33], [], [10, 10, 1, 33], [12, 12, 1, 33], [], [60, 60, 7, 33], [60, 90.1, 7, 33], [90, 90, 7, 33], [], [70, 70, 7, 33], [70, 80, 7, 33], [80, 80, 7, 33], []]}";
//			multipoint = (com.esri.core.geometry.MultiPoint)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(multipoint != null);
//			multipoint.QueryEnvelope2D(envelope);
//			// assertTrue(envelope.xmin == 10 && envelope.xmax == 90 &&
//			// envelope.ymin == 10 && Math.abs(envelope.ymax - 90.1) <= 0.001);
//			NUnit.Framework.Assert.IsTrue(multipoint.GetPointCount() == 13);
//			// assertTrue(multipoint.hasAttribute(VertexDescription.Semantics.Z));
//			// assertTrue(multipoint.hasAttribute(VertexDescription.Semantics.M));
//			geoJsonString = "{\"type\": \"Multipoint\", \"coordinates\": [[10, 88, 88, 33], [10, 20, 5, 33], [20, 20, 5, 33], [20, 10, 5, 33], [12, 12, 3, 33], [10, 10, 1, 33], [12, 12, 1, 33], [60, 60, 7, 33], [60, 90.1, 7, 33], [90, 90, 7, 33], [70, 70, 7, 33], [70, 80, 7, 33], [80, 80, 7, 33]]}";
//			multipoint = (com.esri.core.geometry.MultiPoint)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(multipoint != null);
//			// assertTrue(envelope.xmin == 10 && envelope.xmax == 90 &&
//			// envelope.ymin == 10 && ::fabs(envelope.ymax - 90.1) <= 0.001);
//			NUnit.Framework.Assert.IsTrue(multipoint.GetPointCount() == 13);
//			// assertTrue(multipoint.hasAttribute(VertexDescription.Semantics.Z));
//			// assertTrue(multipoint.hasAttribute(VertexDescription.Semantics.M));
//			geoJsonString = "{\"type\": \"Multipoint\", \"coordinates\": [[], [], [10, 10, 5, 33]]}";
//			multipoint = (com.esri.core.geometry.MultiPoint)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//		}
//
//		/// <exception cref="org.json.JSONException"/>
//		[NUnit.Framework.Test]
//		public static void TestImportGeoJsonPolygon()
//		{
//			com.esri.core.geometry.OperatorImportFromGeoJson importerGeoJson = (com.esri.core.geometry.OperatorImportFromGeoJson)com.esri.core.geometry.OperatorFactoryLocal.GetInstance().GetOperator(com.esri.core.geometry.Operator.Type.ImportFromGeoJson);
//			com.esri.core.geometry.Polygon polygon;
//			string geoJsonString;
//			com.esri.core.geometry.Envelope2D envelope = new com.esri.core.geometry.Envelope2D();
//			// Test Import from Polygon
//			geoJsonString = "{\"type\": \"Polygon\", \"coordinates\": []}";
//			polygon = (com.esri.core.geometry.Polygon)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polygon != null);
//			NUnit.Framework.Assert.IsTrue(polygon.IsEmpty());
//			NUnit.Framework.Assert.IsTrue(!polygon.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z));
//			NUnit.Framework.Assert.IsTrue(!polygon.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.M));
//			geoJsonString = "{\"type\": \"Polygon\", \"coordinates\": [[], [[10, 10, 5], [20, 10, 5], [20, 20, 5], [10, 20, 5], [10, 10, 5]], [[12, 12, 3]], [], [[10, 10, 1], [12, 12, 1]]]}";
//			polygon = (com.esri.core.geometry.Polygon)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polygon != null);
//			polygon.QueryEnvelope2D(envelope);
//			NUnit.Framework.Assert.IsTrue(envelope.xmin == 10 && envelope.xmax == 20 && envelope.ymin == 10 && envelope.ymax == 20);
//			NUnit.Framework.Assert.IsTrue(polygon.GetPointCount() == 8);
//			NUnit.Framework.Assert.IsTrue(polygon.GetPathCount() == 3);
//			// assertTrue(polygon.hasAttribute(VertexDescription.Semantics.Z));
//			geoJsonString = "{\"type\": \"polygon\", \"coordinates\": [[[35, 10], [10, 20], [15, 40], [45, 45], [35, 10]], [[20, 30], [35, 35], [30, 20], [20, 30]]]}";
//			com.esri.core.geometry.Polygon polygon2 = (com.esri.core.geometry.Polygon)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polygon2 != null);
//		}
//
//		/// <exception cref="org.json.JSONException"/>
//		[NUnit.Framework.Test]
//		public static void TestImportGeoJsonLineString()
//		{
//			com.esri.core.geometry.OperatorImportFromGeoJson importerGeoJson = (com.esri.core.geometry.OperatorImportFromGeoJson)com.esri.core.geometry.OperatorFactoryLocal.GetInstance().GetOperator(com.esri.core.geometry.Operator.Type.ImportFromGeoJson);
//			com.esri.core.geometry.Polyline polyline;
//			string geoJsonString;
//			com.esri.core.geometry.Envelope2D envelope = new com.esri.core.geometry.Envelope2D();
//			// Test Import from LineString
//			geoJsonString = "{\"type\": \"LineString\", \"coordinates\": []}";
//			polyline = (com.esri.core.geometry.Polyline)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polyline != null);
//			NUnit.Framework.Assert.IsTrue(polyline.IsEmpty());
//			NUnit.Framework.Assert.IsTrue(!polyline.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z));
//			NUnit.Framework.Assert.IsTrue(!polyline.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.M));
//			geoJsonString = "{\"type\": \"LineString\", \"coordinates\": [[10, 10, 5], [10, 20, 5], [20, 20, 5], [20, 10, 5]]}";
//			polyline = (com.esri.core.geometry.Polyline)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(polyline != null);
//			polyline.QueryEnvelope2D(envelope);
//			NUnit.Framework.Assert.IsTrue(envelope.xmin == 10 && envelope.xmax == 20 && envelope.ymin == 10 && envelope.ymax == 20);
//			NUnit.Framework.Assert.IsTrue(polyline.GetPointCount() == 4);
//			NUnit.Framework.Assert.IsTrue(polyline.GetPathCount() == 1);
//		}
//
//		// assertTrue(!polyline.hasAttribute(VertexDescription.Semantics.M));
//		/// <exception cref="org.json.JSONException"/>
//		[NUnit.Framework.Test]
//		public static void TestImportGeoJsonPoint()
//		{
//			com.esri.core.geometry.OperatorImportFromGeoJson importerGeoJson = (com.esri.core.geometry.OperatorImportFromGeoJson)com.esri.core.geometry.OperatorFactoryLocal.GetInstance().GetOperator(com.esri.core.geometry.Operator.Type.ImportFromGeoJson);
//			com.esri.core.geometry.Point point;
//			string geoJsonString;
//			// Test Import from Point
//			geoJsonString = "{\"type\": \"Point\", \"coordinates\": []}";
//			point = (com.esri.core.geometry.Point)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(point != null);
//			NUnit.Framework.Assert.IsTrue(point.IsEmpty());
//			NUnit.Framework.Assert.IsTrue(!point.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z));
//			NUnit.Framework.Assert.IsTrue(!point.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.M));
//			geoJsonString = "{\"type\": \"Point\", \"coordinates\": [30.1, 10.6, 5.1, 33.1]}";
//			point = (com.esri.core.geometry.Point)(importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString, null).GetGeometry());
//			NUnit.Framework.Assert.IsTrue(point != null);
//			// assertTrue(point.hasAttribute(VertexDescription.Semantics.Z));
//			// assertTrue(point.hasAttribute(VertexDescription.Semantics.M));
//			double x = point.GetX();
//			double y = point.GetY();
//			// double z = point.getZ();
//			// double m = point.getM();
//			NUnit.Framework.Assert.IsTrue(x == 30.1);
//			NUnit.Framework.Assert.IsTrue(y == 10.6);
//		}
//
//		// assertTrue(z == 5.1);
//		// assertTrue(m == 33.1);
//		/// <exception cref="org.json.JSONException"/>
//		[NUnit.Framework.Test]
//		public static void TestImportGeoJsonSpatialReference()
//		{
//			com.esri.core.geometry.OperatorImportFromGeoJson importerGeoJson = (com.esri.core.geometry.OperatorImportFromGeoJson)com.esri.core.geometry.OperatorFactoryLocal.GetInstance().GetOperator(com.esri.core.geometry.Operator.Type.ImportFromGeoJson);
//			string geoJsonString4326;
//			string geoJsonString3857;
//			// Test Import from Point
//			geoJsonString4326 = "{\"type\": \"Point\", \"coordinates\": [3.0, 5.0], \"crs\": \"EPSG:4326\"}";
//			geoJsonString3857 = "{\"type\": \"Point\", \"coordinates\": [3.0, 5.0], \"crs\": \"EPSG:3857\"}";
//			com.esri.core.geometry.MapGeometry mapGeometry4326 = importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString4326, null);
//			com.esri.core.geometry.MapGeometry mapGeometry3857 = importerGeoJson.Execute(0, com.esri.core.geometry.Geometry.Type.Unknown, geoJsonString3857, null);
//			NUnit.Framework.Assert.IsTrue(mapGeometry4326.Equals(mapGeometry3857) == false);
//			NUnit.Framework.Assert.IsTrue(mapGeometry4326.GetGeometry().Equals(mapGeometry3857.GetGeometry()));
//		}

		public static com.esri.core.geometry.Polygon MakePolygon()
		{
			com.esri.core.geometry.Polygon poly = new com.esri.core.geometry.Polygon();
			poly.StartPath(0, 0);
			poly.LineTo(0, 10);
			poly.LineTo(10, 10);
			poly.LineTo(10, 0);
			poly.StartPath(3, 3);
			poly.LineTo(7, 3);
			poly.LineTo(7, 7);
			poly.LineTo(3, 7);
			poly.StartPath(15, 0);
			poly.LineTo(15, 15);
			poly.LineTo(30, 15);
			poly.LineTo(30, 0);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 2);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 1, 0, 3);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 2, 0, 5);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 3, 0, 7);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 4, 0, 11);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 5, 0, 13);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 6, 0, 17);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 7, 0, 19);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 8, 0, 23);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 9, 0, 29);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 10, 0, 31);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 11, 0, 37);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0, 2);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0, 4);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0, 8);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 3, 0, 16);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 4, 0, 32);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 5, 0, 64);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 6, 0, 128);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 7, 0, 256);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 8, 0, 512);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 9, 0, 1024);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 10, 0, 2048);
			poly.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 11, 0, 4096);
			return poly;
		}
		public virtual void TestPolygon()
		{
			com.esri.core.geometry.Polygon mp = new com.esri.core.geometry.Polygon();
			mp.StartPath(new com.esri.core.geometry.Point(100, 200));
			mp.LineTo(new com.esri.core.geometry.Point(101, 201));
			mp.LineTo(new com.esri.core.geometry.Point(102, 202));
			NUnit.Framework.Assert.IsFalse(mp.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.M));
			mp.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.M);
			NUnit.Framework.Assert.IsTrue(mp.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.M));
			NUnit.Framework.Assert.IsTrue(double.IsNaN(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0)));
			NUnit.Framework.Assert.IsTrue(double.IsNaN(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0)));
			NUnit.Framework.Assert.IsTrue(double.IsNaN(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0)));
			mp.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0, 1);
			mp.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0, 2);
			mp.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0, 3);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0) == 1);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0) == 2);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0) == 3);
			NUnit.Framework.Assert.IsFalse(mp.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z));
			mp.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z);
			NUnit.Framework.Assert.IsTrue(mp.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z));
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0) == 0);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 1, 0) == 0);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 2, 0) == 0);
			mp.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 11);
			mp.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 1, 0, 21);
			mp.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 2, 0, 31);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0) == 1);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0) == 2);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0) == 3);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0) == 11);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 1, 0) == 21);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 2, 0) == 31);
			NUnit.Framework.Assert.IsFalse(mp.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.ID));
			mp.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.ID);
			NUnit.Framework.Assert.IsTrue(mp.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.ID));
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 0, 0) == 0);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 1, 0) == 0);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 2, 0) == 0);
			mp.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.ID, 0, 0, -11);
			mp.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.ID, 1, 0, -21);
			mp.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.ID, 2, 0, -31);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0) == 1);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0) == 2);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0) == 3);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0) == 11);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 1, 0) == 21);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 2, 0) == 31);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 0, 0) == -11);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 1, 0) == -21);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 2, 0) == -31);
			mp.DropAttribute(com.esri.core.geometry.VertexDescription.Semantics.M);
			NUnit.Framework.Assert.IsFalse(mp.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.M));
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0) == 11);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 1, 0) == 21);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 2, 0) == 31);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 0, 0) == -11);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 1, 0) == -21);
			NUnit.Framework.Assert.IsTrue(mp.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 2, 0) == -31);
			com.esri.core.geometry.Polygon mp1 = new com.esri.core.geometry.Polygon();
			mp.CopyTo(mp1);
			NUnit.Framework.Assert.IsFalse(mp1.HasAttribute(com.esri.core.geometry.VertexDescription.Semantics.M));
			NUnit.Framework.Assert.IsTrue(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0) == 11);
			NUnit.Framework.Assert.IsTrue(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 1, 0) == 21);
			NUnit.Framework.Assert.IsTrue(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 2, 0) == 31);
			NUnit.Framework.Assert.IsTrue(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 0, 0) == -11);
			NUnit.Framework.Assert.IsTrue(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 1, 0) == -21);
			NUnit.Framework.Assert.IsTrue(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 2, 0) == -31);
			mp1.DropAllAttributes();
			mp1.MergeVertexDescription(mp.GetDescription());
			NUnit.Framework.Assert.IsTrue(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0) == 0);
			NUnit.Framework.Assert.IsTrue(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 1, 0) == 0);
			NUnit.Framework.Assert.IsTrue(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, 2, 0) == 0);
			NUnit.Framework.Assert.IsTrue(double.IsNaN(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0)));
			NUnit.Framework.Assert.IsTrue(double.IsNaN(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0)));
			NUnit.Framework.Assert.IsTrue(double.IsNaN(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0)));
			NUnit.Framework.Assert.IsTrue(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 0, 0) == 0);
			NUnit.Framework.Assert.IsTrue(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 1, 0) == 0);
			NUnit.Framework.Assert.IsTrue(mp1.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.ID, 2, 0) == 0);
		}
		public virtual void TestIntersectionPolylinePolygon()
		{
			{
				com.esri.core.geometry.Polygon polygon = new com.esri.core.geometry.Polygon();
				polygon.StartPath(0, 0);
				polygon.LineTo(0, 10);
				polygon.LineTo(20, 10);
				polygon.LineTo(20, 0);
				polygon.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 3);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 3, 0, 3);
				polygon.InterpolateAttributes(0, 0, 3);
				com.esri.core.geometry.Polyline polyline = new com.esri.core.geometry.Polyline();
				polyline.StartPath(0, 10);
				polyline.LineTo(5, 5);
				polyline.LineTo(6, 4);
				polyline.LineTo(7, -1);
				polyline.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 5);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 3, 0, 5);
				polyline.InterpolateAttributes(0, 0, 0, 3);
				// OperatorFactoryLocal projEnv =
				// OperatorFactoryLocal.getInstance();
				com.esri.core.geometry.OperatorIntersection operatorIntersection = (com.esri.core.geometry.OperatorIntersection)projEnv.GetOperator(com.esri.core.geometry.Operator.Type.Intersection);
				com.esri.core.geometry.Geometry geom = operatorIntersection.Execute(polyline, polygon, null, null);
				NUnit.Framework.Assert.IsTrue(!geom.IsEmpty());
				com.esri.core.geometry.Polyline poly = (com.esri.core.geometry.Polyline)(geom);
				for (int i = 0; i < poly.GetPointCount(); i++)
				{
					NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, i, 0) == 5);
				}
			}
			{
				// std::shared_ptr<Operator_export_to_JSON> jsonExport =
				// (Operator_export_to_JSON>)Operator_factory_local::get_instance().get_operator(Operator::Operator_type::export_to_JSON);
				// std::string str = jsonExport.execute(0, geom, null, null);
				// OutputDebugStringA(str.c_str());
				// OutputDebugString(L"\n");
				// assertTrue(str=="{\"paths\":[[[0,10],[5,5],[6,4],[6.7999999999999998,4.4408922169635528e-016]]]}");
				com.esri.core.geometry.Polygon polygon = new com.esri.core.geometry.Polygon();
				polygon.StartPath(0, 0);
				polygon.LineTo(0, 10);
				polygon.LineTo(20, 10);
				polygon.LineTo(20, 0);
				polygon.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 3);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 3, 0, 3);
				polygon.InterpolateAttributes(0, 0, 3);
				com.esri.core.geometry.Polyline polyline = new com.esri.core.geometry.Polyline();
				polyline.StartPath(0, 10);
				polyline.LineTo(20, 0);
				polyline.LineTo(5, 5);
				polyline.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 5);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 1, 0, 5);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 2, 0, 5);
				// OperatorFactoryLocal projEnv =
				// OperatorFactoryLocal.getInstance();
				com.esri.core.geometry.OperatorIntersection operatorIntersection = (com.esri.core.geometry.OperatorIntersection)projEnv.GetOperator(com.esri.core.geometry.Operator.Type.Intersection);
				com.esri.core.geometry.Geometry geom = operatorIntersection.Execute(polyline, polygon, null, null);
				NUnit.Framework.Assert.IsTrue(!geom.IsEmpty());
				com.esri.core.geometry.Polyline poly = (com.esri.core.geometry.Polyline)(geom);
				for (int i = 0; i < poly.GetPointCount(); i++)
				{
					NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, i, 0) == 5);
				}
			}
			{
				// Operator_export_to_JSON> jsonExport =
				// (Operator_export_to_JSON>)Operator_factory_local::get_instance().get_operator(Operator::Operator_type::export_to_JSON);
				// std::string str = jsonExport.execute(0, geom, null, null);
				// OutputDebugStringA(str.c_str());
				// OutputDebugString(L"\n");
				// assertTrue(str=="{\"paths\":[[[0,10],[20,0],[5,5]]]}");
				com.esri.core.geometry.Polygon polygon = new com.esri.core.geometry.Polygon();
				polygon.StartPath(0, 0);
				polygon.LineTo(0, 10);
				polygon.LineTo(20, 10);
				polygon.LineTo(20, 0);
				polygon.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 3);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 3, 0, 3);
				polygon.InterpolateAttributes(0, 0, 3);
				com.esri.core.geometry.Polyline polyline = new com.esri.core.geometry.Polyline();
				polyline.StartPath(0, 0);
				polyline.LineTo(0, 10);
				polyline.LineTo(20, 10);
				polyline.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 5);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 1, 0, 5);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 2, 0, 5);
				// OperatorFactoryLocal projEnv =
				// OperatorFactoryLocal.getInstance();
				com.esri.core.geometry.OperatorIntersection operatorIntersection = (com.esri.core.geometry.OperatorIntersection)projEnv.GetOperator(com.esri.core.geometry.Operator.Type.Intersection);
				com.esri.core.geometry.Geometry geom = operatorIntersection.Execute(polyline, polygon, null, null);
				NUnit.Framework.Assert.IsTrue(!geom.IsEmpty());
				com.esri.core.geometry.Polyline poly = (com.esri.core.geometry.Polyline)(geom);
				for (int i = 0; i < poly.GetPointCount(); i++)
				{
					NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, i, 0) == 5);
				}
			}
			{
				// Operator_export_to_JSON> jsonExport =
				// (Operator_export_to_JSON>)Operator_factory_local::get_instance().get_operator(Operator::Operator_type::export_to_JSON);
				// std::string str = jsonExport.execute(0, geom, null, null);
				// OutputDebugStringA(str.c_str());
				// OutputDebugString(L"\n");
				// assertTrue(str=="{\"paths\":[[[0,0],[0,10],[20,10]]]}");
				com.esri.core.geometry.Polygon polygon = new com.esri.core.geometry.Polygon();
				polygon.StartPath(0, 0);
				polygon.LineTo(0, 10);
				polygon.LineTo(20, 10);
				polygon.LineTo(20, 0);
				com.esri.core.geometry.Polyline polyline = new com.esri.core.geometry.Polyline();
				polyline.StartPath(3, -1);
				polyline.LineTo(17, 1);
				polyline.LineTo(10, 8);
				polyline.LineTo(-1, 5);
				polyline.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 5);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 1, 0, 5);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 2, 0, 5);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 3, 0, 5);
				// OperatorFactoryLocal projEnv =
				// OperatorFactoryLocal.getInstance();
				com.esri.core.geometry.OperatorIntersection operatorIntersection = (com.esri.core.geometry.OperatorIntersection)projEnv.GetOperator(com.esri.core.geometry.Operator.Type.Intersection);
				com.esri.core.geometry.Geometry geom = operatorIntersection.Execute(polyline, polygon, null, null);
				NUnit.Framework.Assert.IsTrue(!geom.IsEmpty());
				com.esri.core.geometry.Polyline poly = (com.esri.core.geometry.Polyline)geom;
				for (int i = 0; i < poly.GetPointCount(); i++)
				{
					NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, i, 0) == 5);
				}
			}
			{
				// Operator_export_to_JSON> jsonExport =
				// (Operator_export_to_JSON>)Operator_factory_local::get_instance().get_operator(Operator::Operator_type::export_to_JSON);
				// std::string str = jsonExport.execute(0, geom, null, null);
				// OutputDebugStringA(str.c_str());
				// OutputDebugString(L"\n");
				// assertTrue(str=="{\"paths\":[[[10,0],[17,1],[10,8],[4.7377092701401439e-024,5.2727272727272734]]]}");
				com.esri.core.geometry.Polygon polygon = new com.esri.core.geometry.Polygon();
				polygon.StartPath(0, 0);
				polygon.LineTo(0, 10);
				polygon.LineTo(20, 10);
				polygon.LineTo(20, 0);
				com.esri.core.geometry.Polyline polyline = new com.esri.core.geometry.Polyline();
				polyline.StartPath(0, 15);
				polyline.LineTo(3, -1);
				polyline.LineTo(17, 1);
				polyline.LineTo(10, 8);
				polyline.LineTo(-1, 5);
				polyline.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 5);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 4, 0, 5);
				polyline.InterpolateAttributes(0, 0, 0, 4);
				com.esri.core.geometry.OperatorIntersection operatorIntersection = (com.esri.core.geometry.OperatorIntersection)projEnv.GetOperator(com.esri.core.geometry.Operator.Type.Intersection);
				com.esri.core.geometry.Geometry geom = operatorIntersection.Execute(polyline, polygon, null, null);
				NUnit.Framework.Assert.IsTrue(!geom.IsEmpty());
				com.esri.core.geometry.Polyline poly = (com.esri.core.geometry.Polyline)geom;
				for (int i = 0; i < poly.GetPointCount(); i++)
				{
					NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, i, 0) == 5);
				}
			}
			{
				// Operator_export_to_JSON> jsonExport =
				// (Operator_export_to_JSON>)Operator_factory_local::get_instance().get_operator(Operator::Operator_type::export_to_JSON);
				// std::string str = jsonExport.execute(0, geom, null, null);
				// OutputDebugStringA(str.c_str());
				// OutputDebugString(L"\n");
				// assertTrue(str=="{\"paths\":[[[0.9375,10],[2.8125,9.476226333847234e-024]],[[10,0],[17,1],[10,8],[4.7377092701401439e-024,5.2727272727272734]]]}");
				com.esri.core.geometry.Polygon polygon = new com.esri.core.geometry.Polygon();
				polygon.StartPath(0, 0);
				polygon.LineTo(0, 10);
				polygon.LineTo(20, 10);
				polygon.LineTo(20, 0);
				com.esri.core.geometry.Polyline polyline = new com.esri.core.geometry.Polyline();
				polyline.StartPath(5, 5);
				polyline.LineTo(1, 1);
				polyline.LineTo(-1, 1);
				polyline.LineTo(-1, 10);
				polyline.LineTo(0, 10);
				polyline.LineTo(6, 6);
				polyline.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 5);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 5, 0, 5);
				polyline.InterpolateAttributes(0, 0, 0, 5);
				// OperatorFactoryLocal projEnv =
				// OperatorFactoryLocal.getInstance();
				com.esri.core.geometry.OperatorIntersection operatorIntersection = (com.esri.core.geometry.OperatorIntersection)projEnv.GetOperator(com.esri.core.geometry.Operator.Type.Intersection);
				com.esri.core.geometry.Geometry geom = operatorIntersection.Execute(polyline, polygon, null, null);
				NUnit.Framework.Assert.IsTrue(!geom.IsEmpty());
				com.esri.core.geometry.Polyline poly = (com.esri.core.geometry.Polyline)geom;
				for (int i = 0; i < poly.GetPointCount(); i++)
				{
					NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, i, 0) == 5);
				}
			}
			{
				// Operator_export_to_JSON> jsonExport =
				// (Operator_export_to_JSON>)Operator_factory_local::get_instance().get_operator(Operator::Operator_type::export_to_JSON);
				// std::string str = jsonExport.execute(0, geom, null, null);
				// OutputDebugStringA(str.c_str());
				// OutputDebugString(L"\n");
				// assertTrue(str=="{\"paths\":[[[5,5],[1,1],[4.738113166923617e-023,1]],[[0,10],[6,6]]]}");
				com.esri.core.geometry.Polygon polygon = new com.esri.core.geometry.Polygon();
				polygon.StartPath(0, 0);
				polygon.LineTo(0, 10);
				polygon.LineTo(20, 10);
				polygon.LineTo(20, 0);
				com.esri.core.geometry.Polyline polyline = new com.esri.core.geometry.Polyline();
				polyline.StartPath(0, 15);
				polyline.LineTo(3, -1);
				polyline.LineTo(17, 1);
				polyline.LineTo(10, 8);
				polyline.LineTo(-1, 5);
				polyline.StartPath(19, 15);
				polyline.LineTo(29, 9);
				polyline.StartPath(19, 15);
				polyline.LineTo(29, 9);
				polyline.StartPath(5, 5);
				polyline.LineTo(1, 1);
				polyline.LineTo(-1, 1);
				polyline.LineTo(-1, 10);
				polyline.LineTo(0, 10);
				polyline.LineTo(6, 6);
				polyline.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 0, 5);
				polyline.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z, 14, 0, 5);
				polyline.InterpolateAttributes(0, 0, 3, 5);
				// OperatorFactoryLocal projEnv =
				// OperatorFactoryLocal.getInstance();
				com.esri.core.geometry.OperatorIntersection operatorIntersection = (com.esri.core.geometry.OperatorIntersection)projEnv.GetOperator(com.esri.core.geometry.Operator.Type.Intersection);
				com.esri.core.geometry.Geometry geom = operatorIntersection.Execute(polyline, polygon, null, null);
				NUnit.Framework.Assert.IsTrue(!geom.IsEmpty());
				com.esri.core.geometry.Polyline poly = (com.esri.core.geometry.Polyline)geom;
				for (int i = 0; i < poly.GetPointCount(); i++)
				{
					NUnit.Framework.Assert.IsTrue(poly.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.Z, i, 0) == 5);
				}
			}
		}
		public static void TestClipAttributes()
		{
			com.esri.core.geometry.OperatorFactoryLocal engine = com.esri.core.geometry.OperatorFactoryLocal.GetInstance();
			com.esri.core.geometry.OperatorClip clipOp = (com.esri.core.geometry.OperatorClip)engine.GetOperator(com.esri.core.geometry.Operator.Type.Clip);
			{
				com.esri.core.geometry.Polygon polygon = new com.esri.core.geometry.Polygon();
				polygon.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.M);
				polygon.StartPath(0, 0);
				polygon.LineTo(30, 30);
				polygon.LineTo(60, 0);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0, 0);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0, 60);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0, 120);
				com.esri.core.geometry.Envelope2D clipper = new com.esri.core.geometry.Envelope2D();
				clipper.SetCoords(10, 0, 50, 20);
				com.esri.core.geometry.Polygon clippedPolygon = (com.esri.core.geometry.Polygon)clipOp.Execute(polygon, clipper, com.esri.core.geometry.SpatialReference.Create(4326), null);
				NUnit.Framework.Assert.IsTrue(clippedPolygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0) == 100);
				NUnit.Framework.Assert.IsTrue(clippedPolygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0) == 19.999999999999996);
				// 20.0
				NUnit.Framework.Assert.IsTrue(clippedPolygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0) == 20);
				NUnit.Framework.Assert.IsTrue(clippedPolygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 3, 0) == 40);
				NUnit.Framework.Assert.IsTrue(clippedPolygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 4, 0) == 80);
				NUnit.Framework.Assert.IsTrue(clippedPolygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 5, 0) == 100);
			}
			{
				com.esri.core.geometry.Polygon polygon = new com.esri.core.geometry.Polygon();
				polygon.AddAttribute(com.esri.core.geometry.VertexDescription.Semantics.M);
				polygon.StartPath(0, 0);
				polygon.LineTo(0, 40);
				polygon.LineTo(20, 40);
				polygon.LineTo(20, 0);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0, 0);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0, 60);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0, 120);
				polygon.SetAttribute(com.esri.core.geometry.VertexDescription.Semantics.M, 3, 0, 180);
				com.esri.core.geometry.Envelope2D clipper = new com.esri.core.geometry.Envelope2D();
				clipper.SetCoords(0, 10, 20, 20);
				com.esri.core.geometry.Polygon clippedPolygon = (com.esri.core.geometry.Polygon)clipOp.Execute(polygon, clipper, com.esri.core.geometry.SpatialReference.Create(4326), null);
				NUnit.Framework.Assert.IsTrue(clippedPolygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 0) == 15);
				NUnit.Framework.Assert.IsTrue(clippedPolygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 1, 0) == 30);
				NUnit.Framework.Assert.IsTrue(clippedPolygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 2, 0) == 150);
				NUnit.Framework.Assert.IsTrue(clippedPolygon.GetAttributeAsDbl(com.esri.core.geometry.VertexDescription.Semantics.M, 3, 0) == 165);
			}
		}