Examples of MismatchedReferenceSystemException


Examples of org.opengis.geometry.MismatchedReferenceSystemException

        throws MismatchedReferenceSystemException {
        if (crs != null) {
            final CoordinateReferenceSystem other = bbox.getCoordinateReferenceSystem();
            if (other != null) {
                if (!CRS.equalsIgnoreMetadata(crs, other)) {
                    throw new MismatchedReferenceSystemException(Errors.format(
                            ErrorKeys.MISMATCHED_COORDINATE_REFERENCE_SYSTEM));
                }
            }
        }
    }
View Full Code Here

Examples of org.opengis.geometry.MismatchedReferenceSystemException

    protected void ensureCompatibleReferenceSystem(DirectPosition location) {
        if (crs != null) {
            final CoordinateReferenceSystem other = location.getCoordinateReferenceSystem();
            if (other != null) {
                if (!CRS.equalsIgnoreMetadata(crs, other)) {
                    throw new MismatchedReferenceSystemException(Errors.format(
                            ErrorKeys.MISMATCHED_COORDINATE_REFERENCE_SYSTEM));
                }
            }
        }
    }
View Full Code Here

Examples of org.opengis.geometry.MismatchedReferenceSystemException

            /*
             * We use strict 'equals' instead of 'equalsIgnoreCase' because if the metadata
             * are not identical, we have no easy way to choose which CRS is the "main" one.
             */
            if (!previousCRS.equals(candidate)) {
                throw new MismatchedReferenceSystemException(
                        Errors.format(ErrorKeys.MISMATCHED_COORDINATE_REFERENCE_SYSTEM));
            }
        }
        return previousCRS;
    }
View Full Code Here

Examples of org.opengis.geometry.MismatchedReferenceSystemException

            crs = getCoordinateReferenceSystem(point, crs);
        }
        if (crs != null) {
            final CoordinateSystem cs = crs.getCoordinateSystem();
            if (!getCoordinateSystemType().isAssignableFrom(cs.getClass())) {
                throw new MismatchedReferenceSystemException(Errors.format(
                        ErrorKeys.UNSUPPORTED_COORDINATE_SYSTEM_$1, cs.getName()));
            }
        }
        return crs;
    }
View Full Code Here

Examples of org.opengis.geometry.MismatchedReferenceSystemException

        }
        final CoordinateReferenceSystem sourceCRS = operation.getSourceCRS();
        if (sourceCRS != null) {
            final CoordinateReferenceSystem crs = envelope.getCoordinateReferenceSystem();
            if (crs != null && !equalsIgnoreMetadata(crs, sourceCRS)) {
                throw new MismatchedReferenceSystemException(
                        Errors.format(ErrorKeys.MISMATCHED_COORDINATE_REFERENCE_SYSTEM));
            }
        }
        MathTransform mt = operation.getMathTransform();
        final GeneralDirectPosition centerPt = new GeneralDirectPosition(mt.getTargetDimensions());
View Full Code Here

Examples of org.opengis.geometry.MismatchedReferenceSystemException

      if (this.getDimension() != orientableCurve.getCoordinateDimension()) {
        throw new MismatchedDimensionException();
      }
      if (!CRS.equalsIgnoreMetadata(this.getCoordinateReferenceSystem(), orientableCurve
          .getCoordinateReferenceSystem()) ) {
        throw new MismatchedReferenceSystemException();
      }
    }
   
    // if we don't want to validate the ring upon creation (for faster creation) use
    // RingImplUnsafe instead of RingImpl
View Full Code Here

Examples of org.opengis.geometry.MismatchedReferenceSystemException

        throw new MismatchedDimensionException();
      }
      CoordinateReferenceSystem exteriorCRS = exterior
          .getCoordinateReferenceSystem();
      if (!CRS.equalsIgnoreMetadata(thisCRS,exteriorCRS)) {
        throw new MismatchedReferenceSystemException();
      }
    }
    if (interiors != null) {
      for (Ring ring : interiors) {
        if (ring != null) {
          if (this.getDimension() != ring.getCoordinateDimension()) {
            throw new MismatchedDimensionException();
          }
          if (!CRS.equalsIgnoreMetadata(thisCRS, ring
              .getCoordinateReferenceSystem()) ) {
            throw new MismatchedReferenceSystemException();
          }
        }
      }
    }
    return new SurfaceBoundaryImpl(getCoordinateReferenceSystem(),
View Full Code Here

Examples of org.opengis.geometry.MismatchedReferenceSystemException

            throws MismatchedReferenceSystemException {
        if (crs != null) {
            final CoordinateReferenceSystem other = bbox.getCoordinateReferenceSystem();
            if (other != null) {
                if (!CRS.equalsIgnoreMetadata(crs, other)) {
                    throw new MismatchedReferenceSystemException(
                            Errors.format(ErrorKeys.MISMATCHED_COORDINATE_REFERENCE_SYSTEM));
                }
            }
        }
    }
View Full Code Here

Examples of org.opengis.geometry.MismatchedReferenceSystemException

    private void ensureCompatibleReferenceSystem(DirectPosition location) {
        if (crs != null) {
            final CoordinateReferenceSystem other = location.getCoordinateReferenceSystem();
            if (other != null) {
                if (!CRS.equalsIgnoreMetadata(crs, other)) {
                    throw new MismatchedReferenceSystemException(
                            Errors.format(ErrorKeys.MISMATCHED_COORDINATE_REFERENCE_SYSTEM));
                }
            }
        }
    }
View Full Code Here

Examples of org.opengis.geometry.MismatchedReferenceSystemException

         || CRS.equalsIgnoreMetadata( crs, ddpp[1].getCoordinateReferenceSystem() )
         || CRS.equalsIgnoreMetadata( crs, ddpp[2].getCoordinateReferenceSystem() )
         || CRS.equalsIgnoreMetadata( crs, ddpp[3].getCoordinateReferenceSystem() )
         )
        ) {
          throw new MismatchedReferenceSystemException(
              "Region of interest defined by mismatched DirectPositions.");
      }
     
      //Check the vectors are inside the vertices.
      //  This is a quick check by envelope, can be more rigorous when we move
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.