Package com.bbn.openmap.proj

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


            segments.add(path);

            from = to;
        }

        Point pt = createPoint(proj.forward(to.getLocation()));
        if (ptSet.contains(pt)) {
            logger.warning("pt set has duplicate at " + pt);
        }

        newPoints.add(pt);
View Full Code Here


        Projection cadrgProj = projection;
        if (!(projection instanceof CADRG)) {
            cadrgProj = new CADRG(projection.getCenter(), projection.getScale(), projection.getWidth(), projection.getHeight());

            Point ulp = cadrgProj.forward(projection.getUpperLeft());
            Point lrp = cadrgProj.forward(projection.getLowerRight());

            int w = (int) Math.abs(lrp.getX() - ulp.getX());
            int h = (int) Math.abs(lrp.getY() - ulp.getY());
View Full Code Here

        Projection cadrgProj = projection;
        if (!(projection instanceof CADRG)) {
            cadrgProj = new CADRG(projection.getCenter(), projection.getScale(), projection.getWidth(), projection.getHeight());

            Point ulp = cadrgProj.forward(projection.getUpperLeft());
            Point lrp = cadrgProj.forward(projection.getLowerRight());

            int w = (int) Math.abs(lrp.getX() - ulp.getX());
            int h = (int) Math.abs(lrp.getY() - ulp.getY());

            // float cadrgScale =
View Full Code Here

                lines.addOMGraphic(currentLine);
            }

            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) {
View Full Code Here

                    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);
                    }
                }

                currentText = new OMText(llpoint.getLatitude(), llpoint.getLongitude(),
View Full Code Here

                lines.addOMGraphic(currentLine);
            }

            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()) {
View Full Code Here

                    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);
                    }
                }

                currentText = new OMText(llpoint.getLatitude(), llpoint.getLongitude(),
View Full Code Here

                            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(),
                            (float) center.getLongitude(),
                            (float) necessaryScale,
View Full Code Here

                    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(),
                            (float) center.getLongitude(),
                            (float) necessaryScale,
                            theMap.getWidth(),
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.