Package org.opengis.referencing.operation

Examples of org.opengis.referencing.operation.CoordinateOperationFactory.createOperation()


        GeneralEnvelope gridEnvelopeBboxCRS = null;
        if (bboxCRs instanceof GeographicCRS) {
            try {
                CoordinateOperationFactory cof = CRS.getCoordinateOperationFactory(true);

                final CoordinateOperation operation = cof.createOperation(gridEnvelope
                        .getCoordinateReferenceSystem(), bboxCRs);
                gridEnvelopeBboxCRS = CRS.transform(operation, gridEnvelope);
            } catch (Exception e) {
                // this may happen, there is nothing we can do about it, we just
                // use the back transformed envelope to be more lenient about
View Full Code Here


        // Gets a first estimation using an algorithm capable to take singularity in account
        // (North pole, South pole, 180� longitude). We will expand this initial box later.
       
        CoordinateOperationFactory coordinateOperationFactory = CRS.getCoordinateOperationFactory(lenient);

        final CoordinateOperation operation = coordinateOperationFactory.createOperation(crs, targetCRS);
        final GeneralEnvelope transformed = CRS.transform(operation, this);
        transformed.setCoordinateReferenceSystem(targetCRS);

       // Now expands the box using the usual utility methods.
       
View Full Code Here

         * Gets a first estimation using an algorithm capable to take singularity in account
         * (North pole, South pole, 180� longitude). We will expand this initial box later.
         */
        CoordinateOperationFactory coordinateOperationFactory = CRS.getCoordinateOperationFactory(lenient);

        final CoordinateOperation operation = coordinateOperationFactory.createOperation(crs, targetCRS);
        final GeneralEnvelope transformed = CRS.transform(operation, this);
        transformed.setCoordinateReferenceSystem(targetCRS);

        /*
         * Now expands the box using the usual utility methods.
View Full Code Here

         * Gets a first estimation using an algorithm capable to take singularity in account
         * (North pole, South pole, 180� longitude). We will expand this initial box later.
         */
        CoordinateOperationFactory coordinateOperationFactory = CRS
                .getCoordinateOperationFactory(lenient);
        CoordinateOperation operation1 = coordinateOperationFactory.createOperation(
                sourceEnvelope.getCoordinateReferenceSystem(), DefaultGeographicCRS.WGS84);
        MathTransform transform1 = operation1.getMathTransform();
        final CoordinateOperation operation2 = coordinateOperationFactory.createOperation(
                DefaultGeographicCRS.WGS84_3D, targetCRS);
        MathTransform transform2 = operation2.getMathTransform();
View Full Code Here

        CoordinateOperationFactory coordinateOperationFactory = CRS
                .getCoordinateOperationFactory(lenient);
        CoordinateOperation operation1 = coordinateOperationFactory.createOperation(
                sourceEnvelope.getCoordinateReferenceSystem(), DefaultGeographicCRS.WGS84);
        MathTransform transform1 = operation1.getMathTransform();
        final CoordinateOperation operation2 = coordinateOperationFactory.createOperation(
                DefaultGeographicCRS.WGS84_3D, targetCRS);
        MathTransform transform2 = operation2.getMathTransform();

        for( int t = 0; t < npoints; t++ ){
            double dx = scaleX * t;
 
View Full Code Here

         * (North pole, South pole, 180� longitude). We will expand this initial box later.
         */
        CoordinateOperationFactory coordinateOperationFactory = CRS
                .getCoordinateOperationFactory(lenient);
        CoordinateReferenceSystem sourceCRS = sourceEnvelope.getCoordinateReferenceSystem();
        CoordinateOperation operation1 = coordinateOperationFactory.createOperation(
                sourceCRS, DefaultGeographicCRS.WGS84_3D);
        MathTransform transform1 = operation1.getMathTransform();
        final CoordinateOperation operation2 = coordinateOperationFactory.createOperation(
                DefaultGeographicCRS.WGS84, targetCRS);
        MathTransform transform2 = operation2.getMathTransform();
View Full Code Here

                .getCoordinateOperationFactory(lenient);
        CoordinateReferenceSystem sourceCRS = sourceEnvelope.getCoordinateReferenceSystem();
        CoordinateOperation operation1 = coordinateOperationFactory.createOperation(
                sourceCRS, DefaultGeographicCRS.WGS84_3D);
        MathTransform transform1 = operation1.getMathTransform();
        final CoordinateOperation operation2 = coordinateOperationFactory.createOperation(
                DefaultGeographicCRS.WGS84, targetCRS);
        MathTransform transform2 = operation2.getMathTransform();
   
        for( int t = 0; t < npoints; t++ ){
            double dx = scaleX * t;
 
View Full Code Here

        crsFactory = ReferencingFactoryFinder.getCRSAuthorityFactory("EPSG", null);
        opFactory  = ReferencingFactoryFinder.getCoordinateOperationFactory(null);
        sourceCRS  = crsFactory.createCoordinateReferenceSystem("4230");
        targetCRS  = crsFactory.createCoordinateReferenceSystem("4326");
        operation  = opFactory.createOperation(sourceCRS, targetCRS);

        assertSame(sourceCRS, operation.getSourceCRS());
        assertSame(targetCRS, operation.getTargetCRS());
        assertSame(operation, opFactory.createOperation(sourceCRS, targetCRS));
        assertTrue("Expected a buffered factory but got " + opFactory.getClass().getName(),
View Full Code Here

        targetCRS  = crsFactory.createCoordinateReferenceSystem("4326");
        operation  = opFactory.createOperation(sourceCRS, targetCRS);

        assertSame(sourceCRS, operation.getSourceCRS());
        assertSame(targetCRS, operation.getTargetCRS());
        assertSame(operation, opFactory.createOperation(sourceCRS, targetCRS));
        assertTrue("Expected a buffered factory but got " + opFactory.getClass().getName(),
                opFactory instanceof BufferedCoordinateOperationFactory);
        assertTrue("EPSG authority factory not found.",
                ((BufferedCoordinateOperationFactory) opFactory).getImplementationHints().
                get(Hints.COORDINATE_OPERATION_FACTORY) instanceof AuthorityBackedFactory);
View Full Code Here

         * Tests a transformation not backed directly by an authority factory.
         * However, the inverse transform may exist in the authority factory.
         */
        sourceCRS  = crsFactory.createCoordinateReferenceSystem("4326");
        targetCRS  = crsFactory.createCoordinateReferenceSystem("2995");
        operation  = opFactory.createOperation(sourceCRS, targetCRS);
        assertTrue("This test needs an operation not backed by the EPSG factory.",
                   operation.getIdentifiers().isEmpty());
        // Should contains exactly one transformations and an arbitrary number of conversions.
        assertTrue(operation instanceof ConcatenatedOperation);
        int count = 0;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.