Package com.bbn.openmap.proj

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


                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

        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

        }

        if (llp == null) {
            return proj.inverse(event.getX(), event.getY());
        } else {
            return proj.inverse(event.getX(), event.getY(), llp);
        }
    }

    /**
     * Interface-like method to query if the MapBean is buffered, so you can
View Full Code Here

        line = new OMLine(right_x, lower_y, right_x, upper_y);
        line.setLinePaint(lineColor);
        graphics.add(line);

        LatLonPoint loc1 = projection.inverse(left_x, lower_y);
        LatLonPoint loc2 = projection.inverse(right_x, lower_y);

        float dist = GreatCircle.spherical_distance(loc1.radlat_,
                loc1.radlon_,
                loc2.radlat_,
View Full Code Here

        line = new OMLine(right_x, lower_y, right_x, upper_y);
        line.setLinePaint(lineColor);
        graphics.add(line);

        LatLonPoint loc1 = projection.inverse(left_x, lower_y);
        LatLonPoint loc2 = projection.inverse(right_x, lower_y);

        float dist = GreatCircle.spherical_distance(loc1.radlat_,
                loc1.radlon_,
                loc2.radlat_,
                loc2.radlon_);
View Full Code Here

        return false;
    }

    public boolean mouseReleased(MouseEvent e) {
        Projection projection = getProjection();
        LatLonPoint ll = projection.inverse(e.getX(), e.getY());
        location = new DTEDLocation(e.getX(), e.getY());
        location.setElevation(cache.getElevation(ll.getLatitude(),
                ll.getLongitude()));
        location.generate(projection);
        repaint();
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.