Esempio n. 1
0
        private static StaticCoordinateOperationCompiler.StepCompilationResult CreateCoordinateFrameRotationTransformation(TransformationCompilationParams opData)
        {
            Contract.Requires(opData != null);
            Vector3 translation, rotation;
            double  scale;

            if (!ExtractHelmertParams(opData, out translation, out rotation, out scale))
            {
                return(null);
            }

            return(CreateHelmertStep(opData, Helmert7Transformation.CreateCoordinateFrameRotationFormat(translation, rotation, scale)));
        }
Esempio n. 2
0
        public void EpsgExample2432InverseTest()
        {
            var wgs72     = new Point3(3657660.66, 255768.55, 5201382.11);
            var wgs84     = new Point3(3657660.78, 255778.43, 5201387.75);
            var transform = Helmert7Transformation.CreateCoordinateFrameRotationFormat(
                new Vector3(0, 0, 4.5),
                new Vector3(0, 0, 0.000002685868),
                0.219
                );

            var result = transform.GetInverse().TransformValue(wgs84);

            Assert.AreEqual(wgs72.X, result.X, 0.7);
            Assert.AreEqual(wgs72.Y, result.Y, 10);
            Assert.AreEqual(wgs72.Z, result.Z, 0.0009);
        }