Geometry rotate 2d

Supported in: Streaming

Applies a two dimensional clockwise rotation centered at the provided GeoPoint to the supplied geometry. This rotation occurs in the provided coordinate reference system and is then projected back to WGS84.

Expression categories: Geospatial

Declared arguments

  • Angle in degrees - The angle in degrees of clockwise rotation.
    Literal<Double>
  • Centre GeoPoint - The centre GeoPoint about which the rotation occurs. Assumed to be in WGS84.
    Expression<GeoPoint>
  • Geometry column - The geometries on which the rotation is applied.
    Expression<Geometry>
  • Projected coordinate system - Coordinate system identifier formatted as "authority". For example, UTM zone 18N could be identified by EPSG:32618. Geometries will be projected to the source coordinate system, have a rotation applied, then projected back to WGS84.
    Literal<String>

Output type: Geometry

Examples

Example 1: Base case

Argument values:

  • Angle in degrees: 90.0
  • Centre GeoPoint: geoPoint
  • Geometry column: geometry
  • Projected coordinate system: EPSG:4326
geometrygeoPointOutput
{"type":"Point","coordinates":[1.0, 0.0]}{
 latitude -> 0.0,
 longitude -> 0.0,
}
{"type":"Point","coordinates":[6.123233995736766E-17, -1.0]}

Example 2: Base case

Argument values:

  • Angle in degrees: 270.0
  • Centre GeoPoint: geoPoint
  • Geometry column: geometry
  • Projected coordinate system: EPSG:32618
geometrygeoPointOutput
{"type":"Point","coordinates":[-77.0, 20.0]}{
 latitude -> 22.0,
 longitude -> -76.0,
}
{"type":"Point","coordinates":[-73.8719606865239, 21.041418391118174]}

Example 3: Base case

Argument values:

  • Angle in degrees: 180.0
  • Centre GeoPoint: geoPoint
  • Geometry column: geometry
  • Projected coordinate system: EPSG:4326
geometrygeoPointOutput
{"type":"LineString","coordinates":[[0.0, 0.0], [1.0, 0.0]]}{
 latitude -> 1.0,
 longitude -> 1.0,
}
{"type":"LineString","coordinates":[[2.0, 2.0], [0.9999999999999999, 2.0]]}

Example 4: Null case

Argument values:

  • Angle in degrees: 90.0
  • Centre GeoPoint: geoPoint
  • Geometry column: geometry
  • Projected coordinate system: EPSG:4326
geometrygeoPointOutput
nullnullnull