PolygonDataBuilder (API Reference)
Class PolygonDataBuilder
Builder of PolygonData instances.
The builder can create PolygonData instances for polygons with an outer boundary and
optionally one or more inner boundaries (holes).
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance ofPolygonDataand resets the builder instance.withAttributes(DataAttributes attributes) Configures the builder with custom attributes for polygon to be created.withGeometry(GeoPolygon geometry) Configures the builder with geometry for the polygon to be created.
-
Constructor Details
-
PolygonDataBuilder
public PolygonDataBuilder()Creates a builder instance.
-
-
Method Details
-
withGeometry
Configures the builder with geometry for the polygon to be created.
- Parameters:
geometry-Geometry of the polygon. The outer boundary has to be ordered clockwise and closed. Any inner boundary has to be ordered counterclockwise and closed. Altitude of boundary vertices is ignored. The visual behaviour for self-intersecting outer boundary is undefined.
- Returns:
The builder.
-
withAttributes
Configures the builder with custom attributes for polygon to be created.
- Parameters:
attributes-Custom data attributes to be associated with the polygon.
- Returns:
The builder.
-
build
Builds an instance of
PolygonDataand resets the builder instance.- Returns:
Instance of
PolygonDatacreated with the configured parameters.
-