Package org.geotools.factory

Examples of org.geotools.factory.BasicFactories


            CoordinateReferenceSystem pointCRS = position.getCoordinateReferenceSystem();
            DirectPosition copy = new DirectPositionImpl(position);
            if ((myCRS != null) && (pointCRS != null) && (!myCRS.equals(pointCRS))) {
                // Do the conversion.
                try {
                  BasicFactories commonFactory = BasicFactories.getDefault();
                    CoordinateOperationFactory cof = commonFactory.getCoordinateOperationFactory();
                    CoordinateOperation coordOp = cof.createOperation(pointCRS, myCRS);
                    MathTransform mt = coordOp.getMathTransform();
                    mt.transform(position, copy);
                }
                catch (OperationNotFoundException e) {
View Full Code Here


     * creates a new geometry by invoking that transform on each control point
     * of this geometry.
     */
    public final Geometry transform(final CoordinateReferenceSystem newCRS) throws TransformException {
        try {
            BasicFactories commonFactory = BasicFactories.getDefault();
            CoordinateOperationFactory cof = commonFactory.getCoordinateOperationFactory();
            CoordinateReferenceSystem oldCRS = getCoordinateReferenceSystem();
            CoordinateOperation coordOp = cof.createOperation(oldCRS, newCRS);
            MathTransform mt = coordOp.getMathTransform();
            return transform(newCRS, mt);
        }
View Full Code Here

TOP

Related Classes of org.geotools.factory.BasicFactories

Copyright © 2018 www.massapicom. 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.