Examples of NoSuchIdentifierException


Examples of org.opengis.referencing.NoSuchIdentifierException

        for (final OperationMethod method : mtFactory.getAvailableMethods(Operation.class)) {
            if (AbstractIdentifiedObject.nameMatches(method, name)) {
                return method;
            }
        }
        throw new NoSuchIdentifierException(Errors.format(
                  ErrorKeys.NO_TRANSFORM_FOR_CLASSIFICATION_$1, name), name);
    }
View Full Code Here

Examples of org.opengis.referencing.NoSuchIdentifierException

                return value;
            }
            throw new FactoryException(Errors.format(
                    ErrorKeys.ILLEGAL_CLASS_$2, actualType, type));
        }
        throw new NoSuchIdentifierException(Errors.format(
                ErrorKeys.NO_SUCH_AUTHORITY_CODE_$2, type, text), text);
    }
View Full Code Here

Examples of org.opengis.referencing.NoSuchIdentifierException

            provider = providers.next();
            if (provider.nameMatches(method)) {
                return lastProvider = provider;
            }
        }
        throw new NoSuchIdentifierException(Errors.format(
                  ErrorKeys.NO_TRANSFORM_FOR_CLASSIFICATION_$1, method), method);
    }
View Full Code Here

Examples of org.opengis.referencing.NoSuchIdentifierException

     */
    public NADCONTransform(final URI latGridName, final URI longGridName)
            throws ParameterNotFoundException, FactoryException
    {
        if(latGridName == null) {
            throw new NoSuchIdentifierException("Latitud grid shift file name is null", null);
        }
       
        if(longGridName == null) {
            throw new NoSuchIdentifierException("Latitud grid shift file name is null", null);
        }
       
        this.latGridName  = latGridName;
        this.longGridName = longGridName;
       
View Full Code Here

Examples of org.opengis.referencing.NoSuchIdentifierException

     * @param file NTv2 grid file name
     * @throws NoSuchIdentifierException if the grid is not available.
     */
    public NTv2Transform(URI file) throws NoSuchIdentifierException {
        if (file == null) {
            throw new NoSuchIdentifierException("No NTv2 Grid File specified.", null);
        }
       
        this.grid = file;
       
        gridLocation = locateGrid(grid.toString());
        if(gridLocation == null) {
            throw new NoSuchIdentifierException("Could not locate NTv2 Grid File " + file, null);
        }
       
        // Search for grid file
        if (!FACTORY.isNTv2Grid(gridLocation)) {
            throw new NoSuchIdentifierException("NTv2 Grid File not available.",
                    file.toString());
        }
    }
View Full Code Here

Examples of org.opengis.referencing.NoSuchIdentifierException

                 * caused by a MathTransform not yet supported in Geotools (or only partially
                 * supported) rather than some more serious failure in the database side.
                 * CoordinateOperationSet uses this information in order to determine if it
                 * should try the next coordinate operation or propagate the exception.
                 */
                final NoSuchIdentifierException e = new NoSuchIdentifierException(
                        Errors.format(ErrorKeys.CANT_SET_PARAMETER_VALUE_$1, name), name);
                e.initCause(exception);
                throw e;
            }
            try {
                if (reference != null) {
                    param.setValue(reference);
View Full Code Here

Examples of org.opengis.util.NoSuchIdentifierException

        final String value;
        final DefinitionURI uri = DefinitionURI.parse(code);
        if (uri != null) {
            final String type = uri.type;
            if (type != null && !type.equalsIgnoreCase("crs")) {
                throw new NoSuchIdentifierException(Errors.format(Errors.Keys.UnknownType_1, type), type);
            }
            authority = uri.authority;
            value = uri.code;
        } else {
            final int s = code.indexOf(DefinitionURI.SEPARATOR);
            authority = CharSequences.trimWhitespaces(code.substring(0, Math.max(0, s)));
            value = CharSequences.trimWhitespaces(code.substring(s + 1));
        }
        if (authority == null || authority.isEmpty()) {
            throw new NoSuchIdentifierException(Errors.format(Errors.Keys.MissingAuthority_1, code), code);
        }
        /*
         * Code below this point is a temporary implementation to
         * be removed after we ported the EPSG authority factory.
         */
        NumberFormatException cause = null;
        try {
            if (authority.equalsIgnoreCase("CRS")) {
                switch (Integer.parseInt(value)) {
                    case 27: return CommonCRS.NAD27.normalizedGeographic();
                    case 83: return CommonCRS.NAD83.normalizedGeographic();
                    case 84: return CommonCRS.WGS84.normalizedGeographic();
                }
            } else if (authority.equalsIgnoreCase("EPSG")) {
                final int n = Integer.parseInt(value);
                if (n != 0) { // CommonCRS uses 0 as a sentinel value for "no EPSG code".
                    for (final CommonCRS candidate : CommonCRS.values()) {
                        if (candidate.geographic == n) return candidate.geographic();
                        if (candidate.geocentric == n) return candidate.geocentric();
                        if (candidate.geo3D      == n) return candidate.geographic3D();
                    }
                    for (final CommonCRS.Vertical candidate : CommonCRS.Vertical.values()) {
                        if (candidate.isEPSG && candidate.crs == n) {
                            return candidate.crs();
                        }
                    }
                }
            } else {
                throw new NoSuchIdentifierException(Errors.format(Errors.Keys.UnknownAuthority_1, authority), authority);
            }
        } catch (NumberFormatException e) {
            cause = e;
        }
        final NoSuchAuthorityCodeException e = new NoSuchAuthorityCodeException(
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.