/** * Returns {@code true} if a transformation built from this set of parameters would perform no operation. * This is true when the value of all parameters is zero. * * @return {@code true} if the parameters describe no operation. */ public boolean isIdentity() { return tX == 0 && tY == 0 && tZ == 0 && isTranslation(); }
/** * Returns {@code true} if a transformation built from this set of parameters would perform no operation. * This is true when the value of all parameters is zero. * * @return {@code true} if the parameters describe no operation. */ public boolean isIdentity() { return tX == 0 && tY == 0 && tZ == 0 && isTranslation(); }
/** * {@inheritDoc} * * @return {@code true} if the parameters describe a translation only. */ @Override public boolean isTranslation() { return super.isTranslation() && drX == 0 && drY == 0 && drZ == 0; }
/** * {@inheritDoc} * * @return {@code true} if the parameters describe a translation only. */ @Override public boolean isTranslation() { return super.isTranslation() && drX == 0 && drY == 0 && drZ == 0; }
continue; final boolean isTranslation = parameters.isTranslation(); final Parameters values = createParameters(isTranslation ? GeocentricTranslation.PARAMETERS : PositionVector7Param.PARAMETERS, parameters, isTranslation);
continue; final boolean isTranslation = parameters.isTranslation(); final Parameters values = createParameters(isTranslation ? GeocentricTranslation.PARAMETERS : PositionVector7Param.PARAMETERS, parameters, isTranslation);
if (Utilities.equalsIgnoreMetadata(CommonCRS.WGS84.datum(), bwp.getTargetDatum())) { definition.append(" +towgs84=").append(bwp.tX).append(',').append(bwp.tY).append(',').append(bwp.tZ); if (!bwp.isTranslation()) { definition.append(',').append(bwp.rX).append(',').append(bwp.rY).append(',').append(bwp.rZ).append(',').append(bwp.dS);
if (Utilities.equalsIgnoreMetadata(CommonCRS.WGS84.datum(), bwp.getTargetDatum())) { definition.append(" +towgs84=").append(bwp.tX).append(',').append(bwp.tY).append(',').append(bwp.tZ); if (!bwp.isTranslation()) { definition.append(',').append(bwp.rX).append(',').append(bwp.rY).append(',').append(bwp.rZ).append(',').append(bwp.dS);
/** * Invokes {@link BursaWolfParameters#getPositionVectorTransformation(Date)} * and compares with our own matrix calculated using double arithmetic. */ private static MatrixSIS getPositionVectorTransformation(final BursaWolfParameters p) { final double S = 1 + p.dS / BursaWolfParameters.PPM; final double RS = TO_RADIANS * S; final Matrix4 expected = new Matrix4( S, -p.rZ*RS, +p.rY*RS, p.tX, +p.rZ*RS, S, -p.rX*RS, p.tY, -p.rY*RS, +p.rX*RS, S, p.tZ, 0, 0, 0, 1); final MatrixSIS matrix = MatrixSIS.castOrCopy(p.getPositionVectorTransformation(null)); assertMatrixEquals("getPositionVectorTransformation", expected, matrix, p.isTranslation() ? 0 : 1E-14); return matrix; }
/** * Returns the parameters for the <cite>WGS 72 to WGS 84 (2)</cite> transformation (EPSG:1238). * Area of validity is the World. */ static BursaWolfParameters createWGS72_to_WGS84() { final BursaWolfParameters bursaWolf = new BursaWolfParameters(GeodeticDatumMock.WGS84, Extents.WORLD); bursaWolf.tZ = 4.5; bursaWolf.rZ = 0.554; bursaWolf.dS = 0.219; bursaWolf.verify(PrimeMeridianMock.GREENWICH); assertFalse("isIdentity", bursaWolf.isIdentity()); assertFalse("isTranslation", bursaWolf.isTranslation()); return bursaWolf; }
/** * Returns the parameters for the <cite>NTF to WGS 84 (1)</cite> transformation (EPSG:1193). * Area of validity is France - onshore - mainland and Corsica. * This transformation uses only translation parameters. */ static BursaWolfParameters createNTF_to_WGS84() { final BursaWolfParameters bursaWolf = new BursaWolfParameters(GeodeticDatumMock.WGS84, Extents.WORLD); bursaWolf.tX = -168; bursaWolf.tY = -60; bursaWolf.tZ = 320; bursaWolf.verify(PrimeMeridianMock.GREENWICH); assertFalse("isIdentity", bursaWolf.isIdentity()); assertTrue ("isTranslation", bursaWolf.isTranslation()); return bursaWolf; }
final boolean isTranslation = parameters.isTranslation(); final ParameterDescriptorGroup descriptor;
final boolean isTranslation = parameters.isTranslation(); final ParameterDescriptorGroup descriptor;
/** * Returns the parameters for the <cite>ED87 to WGS 84 (1)</cite> transformation (EPSG:1146). * Area of validity is the North Sea: 5.05°W to 11.13°E in longitude and 51.04°N to 62.0°N in latitude. */ static BursaWolfParameters createED87_to_WGS84() { final BursaWolfParameters bursaWolf = new BursaWolfParameters(GeodeticDatumMock.WGS84, new DefaultExtent("Europe - North Sea", new DefaultGeographicBoundingBox(-5.05, 11.13, 51.04, 62.0), null, null)); bursaWolf.tX = -82.981; bursaWolf.tY = -99.719; bursaWolf.tZ = -110.709; bursaWolf.rX = -0.5076; bursaWolf.rY = 0.1503; bursaWolf.rZ = 0.3898; bursaWolf.dS = -0.3143; bursaWolf.verify(PrimeMeridianMock.GREENWICH); assertFalse("isIdentity", bursaWolf.isIdentity()); assertFalse("isTranslation", bursaWolf.isTranslation()); return bursaWolf; }
if (period == null && isTranslation()) { final Matrix4 matrix = new Matrix4(); matrix.m03 = tX;
if (period == null && isTranslation()) { final Matrix4 matrix = new Matrix4(); matrix.m03 = tX;