Package org.geoscript.js.proj

Examples of org.geoscript.js.proj.Projection.unwrap()


        if (projectionObj instanceof Projection) {
            projection = (Projection) projectionObj;
        } else if (projectionObj instanceof String) {
            projection = new Projection((String) projectionObj);
        }
        CoordinateReferenceSystem crs = projection != null ? projection.unwrap() : null;
        refEnv = new ReferencedEnvelope(minX, maxX, minY, maxY, crs);
    }
   
    /**
     * Constructor from array.
View Full Code Here


    public Bounds intersection(Bounds other) {
        Envelope intersection = refEnv.intersection(sameProjection(other).unwrap());
        CoordinateReferenceSystem crs = null;
        Projection projection = getProjection();
        if (projection != null) {
            crs = projection.unwrap();
        }
        ReferencedEnvelope interRefEnv = new ReferencedEnvelope(intersection, crs);
        if (intersection.isNull()) {
            interRefEnv.setToNull();
        }
View Full Code Here

    private Bounds sameProjection(Bounds other) {
        Bounds same = other;
        Projection otherProj = other.getProjection();
        if (otherProj != null) {
            if (!otherProj.equals(getProjection())) {
                same = this.transform(otherProj.unwrap());
            }
        }
        return same;
    }
View Full Code Here

        } else {
            throw new RuntimeException("Argument must be a Projection instance or string identifier.");
        }
        GeometryCoordinateSequenceTransformer gt = new GeometryCoordinateSequenceTransformer();
        try {
            gt.setMathTransform(CRS.findMathTransform(fromProj.unwrap(), toProj.unwrap()));
        } catch (FactoryException e) {
            throw new RuntimeException("Failed to find transform.", e);
        }
        com.vividsolutions.jts.geom.Geometry transGeom;
        try {
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.