scale

fun <T : Geometry> scale(geometry: T, factor: Double, origin: ScaleOrigin = ScaleOrigin.Centroid): T

Scale a GeoJson from a given point by a factor of scaling (ex: factor=2 would make the GeoJson 200% larger). If a GeometryCollection is provided, the origin point will be calculated based on each individual Feature.

Return

scaled Geometry

Parameters

geometry

GeoJson to be scaled

factor

of scaling, positive values greater than 0. Numbers between 0 and 1 will shrink the geojson, numbers greater than 1 will expand it, a factor of 1 will not change the geojson.

origin

Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)