Posted on

ST_Move

ST_Move This is a MySQL function which moves a geometry the supplied delta X and delta Y.

Function Specification.

    Function ST_Move (
                p_geometry geometry,
                p_dX       double,
                p_dY       double,
                p_round_xy int 
             )
     Returns geometry 

Description.

ST_Move is a function that moves the supplied geometry’s ordinates the supplied x and y deltas.

The computed ordinates of the new geometry are rounded to p_round_xy number of decimal digits of precision.

Parameters.

    p_geometry (geometry) - supplied geometry of any type.
    p_dX       (double)   - X ordinate delta shift.
    p_dy       (double)   - Y ordinate delta shift.
    p_round_xy (int)      - Decimal degrees of precision to which calculated XY ordinates are rounded.

Results.

The function moves the supplied geometry by supplied X and Y ordinate deltas.

Example.

    SELECT ST_AsText(
              ST_Move(
                 ST_GeomFromText('LINESTRING(0.1 0.2,1.4 45.2)',0),
                 -5.0, 30.1, 1
              )
           ) as movedGeom;

    # movedGeom
    'LINESTRING(-4.9 30.2,-3.6 31.5)'
Posted on

Change Log

2019-07-19: SQL Server Spatial.

    Corrected installation errors
    Fixed STPointFromText null Z with M handling
    Moved all PostGIS LRS functions into a single script.
    Added STLocateBetweenElevations, STLineSubstring, and STLineInterpolatePoint
    Modified STExtract to extract polygon ring sub elements where ring defined using CircularCurve or CompoundCurve.
    Modified STIsMeasureDecreasing
    Modified STCogo2Line
    Improved function documentation.
    Updated html documentation.

2019-05-17: Created SQL Server Spatial STDensify and STGeometryTypes functions.

2019-01-12: Created install.sh Linux bash script for Oracle PLSQL Object code.