Package org.opengis.referencing.operation

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


                    // otherwise we need to transform
                    final CoordinateReferenceSystem bboxCRS = CRS.decode(bbox.getCrs());
                    requestedEnvelope.setCoordinateReferenceSystem(bboxCRS);
                    if (!CRS.equalsIgnoreMetadata(bboxCRS, nativeCRS)) {
                        CoordinateOperationFactory of = CRS.getCoordinateOperationFactory(true);
                        CoordinateOperation co = of.createOperation(bboxCRS, nativeCRS);
                        requestedEnvelopeInNativeCRS = CRS.transform(co, requestedEnvelope);
                    } else {
                        requestedEnvelopeInNativeCRS = new GeneralEnvelope(requestedEnvelope);
                    }
                }
View Full Code Here


            // adjust the grid geometry to use the final bbox and crs
            final GeneralEnvelope intersectionEnvelope;
            boolean reprojectionNeeded = !CRS.equalsIgnoreMetadata(nativeCRS, targetCRS);
            if (reprojectionNeeded) {
                CoordinateOperationFactory of = CRS.getCoordinateOperationFactory(true);
                CoordinateOperation co = of.createOperation(nativeCRS, targetCRS);
                intersectionEnvelope = CRS.transform(co, intersectionEnvelopeInSourceCRS);
            } else {
                intersectionEnvelope = intersectionEnvelopeInSourceCRS;
            }
View Full Code Here

        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

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.