Examples of inverse()


Examples of com.bbn.openmap.proj.Projection.inverse()

            if (showRuler && (lat % 2) == 0) {
                if (boxy) {
                    point = projection.forward(lat, west);
                    point.x = 0;
                    llpoint = projection.inverse(point);
                } else {
                    llpoint = new LatLonPoint(lat, west);
                    while (projection.forward(llpoint).x < 0) {
                        llpoint.setLongitude(llpoint.getLongitude() + stepSize);
                    }
View Full Code Here

Examples of com.bbn.openmap.proj.Projection.inverse()

            if (showRuler && (lon % 2) == 0) {
                if (boxy) {
                    point = projection.forward(south, lon);
                    point.y = projection.getHeight();
                    llpoint = projection.inverse(point);
                } else {
                    llpoint = new LatLonPoint(south, lon);
                    while (projection.forward(llpoint).y > projection.getHeight()) {
                        llpoint.setLatitude(llpoint.getLatitude() + stepSize);
                    }
View Full Code Here

Examples of com.bbn.openmap.proj.Projection.inverse()

                    }else if(squareUpperLeftY + squareHeight >= theMap.getHeight()){
                        squareUpperLeftY = (int)(theMap.getHeight() - squareHeight - 1);
                        squareCenterY = (int)(squareUpperLeftY + squareHeight/2);
                    }
                    Projection proj = theMap.getProjection();
                    LatLonPoint upperLeft = proj.inverse(squareUpperLeftX,
                            squareUpperLeftY);
                    LatLonPoint lowerRight = proj.inverse(squareUpperLeftX + (int)squareWidth,
                            squareUpperLeftY + (int)squareHeight);
                    LatLonPoint center = proj.inverse(squareCenterX, squareCenterY);
                    double necessaryScale = proj.getScale(upperLeft, lowerRight,
View Full Code Here

Examples of com.bbn.openmap.proj.Projection.inverse()

                        squareCenterY = (int)(squareUpperLeftY + squareHeight/2);
                    }
                    Projection proj = theMap.getProjection();
                    LatLonPoint upperLeft = proj.inverse(squareUpperLeftX,
                            squareUpperLeftY);
                    LatLonPoint lowerRight = proj.inverse(squareUpperLeftX + (int)squareWidth,
                            squareUpperLeftY + (int)squareHeight);
                    LatLonPoint center = proj.inverse(squareCenterX, squareCenterY);
                    double necessaryScale = proj.getScale(upperLeft, lowerRight,
                            proj.forward(upperLeft),
                            proj.forward(lowerRight));
View Full Code Here

Examples of com.bbn.openmap.proj.Projection.inverse()

                    Projection proj = theMap.getProjection();
                    LatLonPoint upperLeft = proj.inverse(squareUpperLeftX,
                            squareUpperLeftY);
                    LatLonPoint lowerRight = proj.inverse(squareUpperLeftX + (int)squareWidth,
                            squareUpperLeftY + (int)squareHeight);
                    LatLonPoint center = proj.inverse(squareCenterX, squareCenterY);
                    double necessaryScale = proj.getScale(upperLeft, lowerRight,
                            proj.forward(upperLeft),
                            proj.forward(lowerRight));
                    final Projection newProj = ProjectionFactory.makeProjection(Mercator.class,
                            (float) center.getLatitude(),
View Full Code Here

Examples of com.bbn.openmap.proj.Projection.inverse()

                    paintRectangle(map, point1, point2);

                    // If rectangle is too small in both x and y then
                    // recenter the map
                    if ((dx < 5) && (dy < 5)) {
                        LatLonPoint llp = projection.inverse(e.getPoint());
                        overviewMapHandler.getControlledMapListeners()
                                .setCenter(llp);
                    }
                    return;
                }
View Full Code Here

Examples of com.bbn.openmap.proj.Projection.inverse()

                    }
                    return;
                }

                // Figure out the new scale
                com.bbn.openmap.LatLonPoint ll1 = projection.inverse(point1);
                com.bbn.openmap.LatLonPoint ll2 = projection.inverse(point2);

                float deltaDegrees;
                int deltaPix;
                dx = Math.abs(point2.x - point1.x);
View Full Code Here

Examples of com.bbn.openmap.proj.Projection.inverse()

                    return;
                }

                // Figure out the new scale
                com.bbn.openmap.LatLonPoint ll1 = projection.inverse(point1);
                com.bbn.openmap.LatLonPoint ll2 = projection.inverse(point2);

                float deltaDegrees;
                int deltaPix;
                dx = Math.abs(point2.x - point1.x);
                dy = Math.abs(point2.y - point1.y);
View Full Code Here

Examples of com.bbn.openmap.proj.Projection.inverse()

                float pixPerDegree = ((Proj) projection).getPlanetPixelCircumference() / 360;
                float newScale = pixPerDegree / (deltaPix / deltaDegrees);

                // Figure out the center of the rectangle
                com.bbn.openmap.LatLonPoint center = projection.inverse(point1.x,
                        point1.y);

                // Set the parameters of the projection and then set
                // the projection of the map. This way we save having
                // the MapBean fire two ProjectionEvents.
View Full Code Here

Examples of com.bbn.openmap.proj.Projection.inverse()

        if (proj == null || event == null) {
            return null;
        }

        if (llp == null) {
            return proj.inverse(event.getX(), event.getY());
        } else {
            return proj.inverse(event.getX(), event.getY(), llp);
        }
    }
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.