Package org.opengis.referencing.operation

Examples of org.opengis.referencing.operation.CoordinateOperationAuthorityFactory


     */
    private void operations(final PrintWriter out, final String[] args) throws FactoryException {
        if (!(factory instanceof CoordinateOperationAuthorityFactory)) {
            return;
        }
        final CoordinateOperationAuthorityFactory factory =
                (CoordinateOperationAuthorityFactory) this.factory;
        char[] separator = null;
        for (int i=0; i<args.length; i++) {
            for (int j=i+1; j<args.length; j++) {
                final Set<CoordinateOperation> op;
                op = factory.createFromCoordinateReferenceSystemCodes(args[i], args[j]);
                for (final CoordinateOperation operation : op) {
                    if (separator == null) {
                        separator = getSeparator();
                    } else {
                        out.println(separator);
View Full Code Here


    public Set<CoordinateOperation> createFromCoordinateReferenceSystemCodes(
            String sourceCRS, String targetCRS) throws NoSuchAuthorityCodeException, FactoryException {
        Set<CoordinateOperation> coordops = super.createFromCoordinateReferenceSystemCodes(sourceCRS, targetCRS);
        if (coordops.isEmpty()) {
            // If not found, delegate to the fallback factory.
            CoordinateOperationAuthorityFactory fallback = getFallbackAuthorityFactory();
            if (fallback != null) {
                coordops = fallback.createFromCoordinateReferenceSystemCodes(sourceCRS, targetCRS);
            }
        }
        return coordops;
    }
View Full Code Here

     */
    public CoordinateOperation createCoordinateOperation(String code)
            throws NoSuchAuthorityCodeException, FactoryException {
        CoordinateOperation coordop = super.createCoordinateOperation(code);
        if (coordop == null) {
            CoordinateOperationAuthorityFactory fallback = getFallbackAuthorityFactory();
            if (fallback != null) {
                coordop = fallback.createCoordinateOperation(code);
            }
        }
        return coordop;
    }
View Full Code Here

     */
    protected CoordinateOperationAuthorityFactory getFallbackAuthorityFactory()
            throws NoSuchAuthorityCodeException, FactoryException {

        if(!fallbackAuthorityFactorySearched) { // Search once
            CoordinateOperationAuthorityFactory candidate = null;
           
            // These hints are to prevent infinite recursion when called
            // from OrderedAxisAuthorityFactory. See "noForce(Hints)"
            // from AuthorityBackedFactory.
            // See also: http://jira.codehaus.org/browse/GEOT-1161
            Hints h = new Hints();
            h.put(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.FALSE);
            h.put(Hints.FORCE_STANDARD_AXIS_DIRECTIONS,   Boolean.FALSE);
            h.put(Hints.FORCE_STANDARD_AXIS_UNITS,        Boolean.FALSE);
           
            Set<CoordinateOperationAuthorityFactory> factories = ReferencingFactoryFinder.
                    getCoordinateOperationAuthorityFactories(h);
            Iterator<CoordinateOperationAuthorityFactory> it = factories.iterator();
           
            // Skip factories with higher priority than me.
            while (it.hasNext()) {
                candidate = it.next();
                if (candidate == this) {
                    break;
                }
            }
           
            // Get the next one for this same authority
            while (it.hasNext()) {
                candidate = it.next();
                if (!(candidate instanceof CoordinateOperationFactoryUsingWKT)
                        && candidate.getAuthority().getTitle().equals(this.getAuthority().getTitle())) {
                    fallbackAuthorityFactory = candidate;
                    break;
                }
            }
            fallbackAuthorityFactorySearched = true;
View Full Code Here

TOP

Related Classes of org.opengis.referencing.operation.CoordinateOperationAuthorityFactory

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.