Package org.opengis.referencing.operation

Examples of org.opengis.referencing.operation.TransformException


            //
            // //
            final CoordinateReferenceSystem tempCRS = CRS.getHorizontalCRS(envelope
                    .getCoordinateReferenceSystem());
            if (tempCRS == null) {
                throw new TransformException(Errors.format(
                        ErrorKeys.CANT_REDUCE_TO_TWO_DIMENSIONS_$1,
                        envelope.getCoordinateReferenceSystem()));
            }
            ReferencedEnvelope envelopeWGS84 = envelope.transform(DefaultGeographicCRS.WGS84, true);
            diagonalGroundDistance = geodeticDiagonalDistance(envelopeWGS84);
View Full Code Here


      Rectangle paintArea, CoordinateReferenceSystem destinationCrs) throws TransformException {

      // is the crs also lon,lat?
    final CoordinateReferenceSystem crs2D= CRS.getHorizontalCRS(destinationCrs);
    if(crs2D==null)
      throw new TransformException(Errors.format(
                    ErrorKeys.CANT_REDUCE_TO_TWO_DIMENSIONS_$1,
                    destinationCrs));
    final boolean lonFirst = crs2D
        .getCoordinateSystem().getAxis(0).getDirection().absolute()
        .equals(AxisDirection.EAST);
View Full Code Here

                }

            }

            throw new TransformException("All attemptsto reproject the envelope " + envelope
                    + " to " + targetCRS + " failed");
        }
    }
View Full Code Here

    public CoordinateSequence transform( CoordinateSequence cs, MathTransform transform )
            throws TransformException {
        if( cs instanceof PackedCoordinateSequence ){
            return transformInternal( (PackedCoordinateSequence) cs, transform);
        }
        throw new TransformException(cs.getClass().getName()+" is not a implementation that is known to be transformable in place");
    }
View Full Code Here

        for(int i=0; i<sequence.size();i++ ){
            start.setOffset(i);
            try {
                transform.transform(start, start);
            } catch (MismatchedDimensionException e) {
                throw new TransformException( "", e);
            }
        }
        return sequence;
    }
View Full Code Here

           
            try {
                featureToRasterTransform = CRS.findMathTransform(featuresCRS, boundsCRS, true);
               
            } catch (Exception ex) {
                throw new TransformException(
                        "Unable to transform features into output coordinate reference system", ex);
            }
           
            transformFeatures = true;
        }
View Full Code Here

    public Matrix derivative(final Point2D point) throws TransformException {
        final int dimSource = getSourceDimensions();
        if (dimSource != 2) {
            throw new MismatchedDimensionException(constructMessage("point", 2, dimSource));
        }
        throw new TransformException(Errors.format(ErrorKeys.CANT_COMPUTE_DERIVATIVE));
    }
View Full Code Here

            }
            if (this instanceof MathTransform1D) {
                return new Matrix1(((MathTransform1D) this).derivative(point.getOrdinate(0)));
            }
        }
        throw new TransformException(Errors.format(ErrorKeys.CANT_COMPUTE_DERIVATIVE));
    }
View Full Code Here

            double x = srcPts[srcOff++];
            double y = srcPts[srcOff++];

            //check bounding box
            if (((x < grid.getMinX()) || (x > grid.getMaxX())) || ((y < grid.getMinY()) || (y > grid.getMaxY()))) {
                throw new TransformException("Point (" + x + " " + y + ") is not outside of ((" + grid.getMinX()
                        + " " + grid.getMinY() + ")(" + grid.getMaxX() + " " + grid.getMaxY() + "))");
            }

            //find the grid the point is in (index is 0 based)
            final double xgrid = (x - grid.getMinX()) / grid.getDx();
View Full Code Here

                    dstPts[dstOff++] = xtemp;
                    dstPts[dstOff++] = ytemp;
                    break;
                }
                if (--i < 0) {
                    throw new TransformException(Errors.format(ErrorKeys.NO_CONVERGENCE));
                }
            }

            srcOff += step;
            dstOff += step;
View Full Code Here

TOP

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

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.