public void TestSTScaleFalseOrigin()
        {
            var expected = new double[][]
            {
                new[] { 1.00, 1.00 },
                new[] { 3.00, 3.00 },
            };

            using (var db = new PostGisTestDataConnection(TestDatabaseConnectionString))
            {
                const string Wkt = "LINESTRING(1 1, 2 2)";
                db.TestGeometries
                .Value(g => g.Id, 1)
                .Value(g => g.Geometry, () => GeometryInput.STGeomFromEWKT(Wkt))
                .Insert();

                var result = db.TestGeometries
                             .Where(g => g.Id == 1)
                             .Select(g => g.Geometry.STScale(GeometryInput.STGeomFromEWKT("POINT(2 2)"), GeometryInput.STGeomFromEWKT("POINT(1 1)")))
                             .Single() as NTSGS.LineString;

                CheckLineEquals(expected, result, 1.0E-8);

                var result2 = db
                              .Select(() => AffineTransformations.STScale(
                                          Wkt,
                                          GeometryInput.STGeomFromEWKT("POINT(2 2)"),
                                          GeometryInput.STGeomFromEWKT("POINT(1 1)"))) as NTSGS.LineString;

                CheckLineEquals(expected, result2, 1.0E-8);
            }
        }
        public void TestSTScaleXYZM()
        {
            var expected = new double[][]
            {
                new[] { 0.5, 1.5, 6.0, -4.0 },
                new[] { 0.5, 0.75, 2.0, -1.0 },
            };

            using (var db = new PostGisTestDataConnection(TestDatabaseConnectionString))
            {
                const string Wkt = "LINESTRING(1 2 3 4, 1 1 1 1)";
                db.TestGeometries
                .Value(g => g.Id, 1)
                .Value(g => g.Geometry, () => GeometryInput.STGeomFromEWKT(Wkt))
                .Insert();

                var result = db.TestGeometries
                             .Where(g => g.Id == 1)
                             .Select(g => g.Geometry.STScale(GeometryConstructors.STMakePoint(0.5, 0.75, 2, -1)))
                             .Single() as NTSGS.LineString;

                CheckLineEquals(expected, result, 1.0E-8);

                var result2 = db
                              .Select(() => AffineTransformations.STScale(Wkt, GeometryConstructors.STMakePoint(0.5, 0.75, 2, -1))) as NTSGS.LineString;

                CheckLineEquals(expected, result2, 1.0E-8);
            }
        }