{
// Add polygons with tagValue = 42 and height = 12.
// The polygons are in a different spatial reference than the tin editor, so we provide the spatial
// reference of the polygons. The polygons will be projected to the spatial reference of the tin editor.
Polygon[] polygons = new Polygon[] //Define some polygons
{
PolygonBuilderEx.CreatePolygon(new List<Coordinate2D>
{
new Coordinate2D(0,0),
//...
}),
PolygonBuilderEx.CreatePolygon(new List<Coordinate2D>
{
new Coordinate2D(20,20),
//..
})
};
tinEditor.AddPolygons(polygons, TinSurfaceType.ZLessSoftLine, 42, 12, SpatialReferenceBuilder.CreateSpatialReference(54004));
// Add z-aware polygons with no tag value. The height comes from the z-values of the vertices.
// The polygons are in the same spatial reference as the tin editor, so there is no need to provide it.
Polygon[] polygonsZ = new Polygon[] //Define some z-aware polygons
{
PolygonBuilderEx.CreatePolygon(new List<Coordinate3D>
{
new Coordinate3D(0,0,5),
//...
}),
PolygonBuilderEx.CreatePolygon(new List<Coordinate3D>
{
new Coordinate3D(20,20,15),
//..
})
};
tinEditor.AddPolygonsZ(polygonsZ, TinSurfaceType.HardLine, 0);
}