projectTo2D

fun projectTo2D(geometry: Geometry, attributeName: String, attributeName3D: String, attributeName2D: String, projection: Any? = definedExternally): Geometry(source)

Projects a geometry's 3D position attribute to 2D, replacing the position attribute with separate position3D and position2D attributes.

If the geometry does not have a position, this function has no effect.

geometry = GeometryPipeline.projectTo2D(geometry, 'position', 'position3D', 'position2D');

Return

The modified geometry argument with position3D and position2D attributes.

Parameters

geometry

The geometry to modify.

attributeName

The name of the attribute.

attributeName3D

The name of the attribute in 3D.

attributeName2D

The name of the attribute in 2D.

projection

The projection to use. Default value - GeographicProjection()

See also