Package com.bbn.openmap

Examples of com.bbn.openmap.LatLonPoint


     * Sets the center of the map to be the coordinates in the
     * latitude and logitude entry boxes
     */
    public boolean setCenter() {

        LatLonPoint llp = getLatLon();
        if (llp == null) {
            return false;// invalid number
        }

        if (Debug.debugging("coordpanel")) {
            Debug.output("CoordPanel.setCenter(): " + llp);
        }

        centerDelegate.fireCenter(llp.getLatitude(), llp.getLongitude());
        return true;
    }
View Full Code Here


     * Get center point of projection.
     *
     * @return LatLonPoint center of projection
     */
    public LatLonPoint getCenter() {
        return new LatLonPoint(ctrLat, ctrLon, true);
    }
View Full Code Here

     *
     * @param point x,y Point
     * @return LatLonPoint (new)
     */
    public final LatLonPoint inverse(Point point) {
        return inverse(point, new LatLonPoint());
    }
View Full Code Here

     * @param y integer y coordinate
     * @return LatLonPoint (new)
     * @see #inverse(Point)
     */
    public final LatLonPoint inverse(int x, int y) {
        return inverse(x, y, new LatLonPoint());
    }
View Full Code Here

        }

        int i, n, xp, flag = 0, xadj = 0, totalpts = 0;
        Point from = new Point(0, 0);
        Point to = new Point(0, 0);
        LatLonPoint llp = null;
        int len = rawllpts.length;

        float[][] augllpts = new float[len >>> 1][0];

        // lock access to object global, since this is probably not
View Full Code Here

     * @throws exception if a parameter is missing or invalid.
     */
    public Projection create(Properties props) throws ProjectionException {

        try {
            LatLonPoint llp = (LatLonPoint) props.get(ProjectionFactory.CENTER);
            float scale = PropUtils.floatFromProperties(props,
                    ProjectionFactory.SCALE,
                    10000000);
            int height = PropUtils.intFromProperties(props,
                    ProjectionFactory.HEIGHT,
View Full Code Here

            Projection p = map.getProjection();

            // This is really not the radius but the half width.
            float radius = ProjMath.radToDeg(uom.toRadians(width)) / 2;

            LatLonPoint left = (LatLonPoint) p.getCenter().clone();
            LatLonPoint right = (LatLonPoint) p.getCenter().clone();
            left.setLongitude(left.getLongitude() - radius);
            right.setLongitude(right.getLongitude() + radius);

            minScale = ProjMath.getScale(left, right, p);
        }

    }
View Full Code Here

        azimuth[nMax] = azimuth[0];
        int nCounter = 0;

        for (i = 0; i < nMax + 1; i++) {

            LatLonPoint llPt = GreatCircle.spherical_between(center.radlat_,
                    center.radlon_,
                    (float) distance[i],
                    azimuth[i]);
            llPoints[nCounter++] = llPt.radlat_;
            llPoints[nCounter++] = llPt.radlon_;
View Full Code Here

    }

    public static void write(OMArc arc, Link link, LinkProperties props)
            throws IOException {

        LatLonPoint llp;
        switch (arc.getRenderType()) {
        case OMArc.RENDERTYPE_LATLON:
            llp = arc.getLatLon();
            LinkArc.write(llp.getLatitude(),
                    llp.getLongitude(),
                    arc.getRadius(),
                    arc.getStartAngle(),
                    arc.getExtentAngle(),
                    props,
                    link.dos);
            break;
        case OMArc.RENDERTYPE_XY:
            LinkArc.write(arc.getX(),
                    arc.getY(),
                    arc.getWidth(),
                    arc.getHeight(),
                    arc.getStartAngle(),
                    arc.getExtentAngle(),
                    props,
                    link.dos);
            break;
        case OMArc.RENDERTYPE_OFFSET:
            llp = arc.getLatLon();
            LinkArc.write(llp.getLatitude(),
                    llp.getLongitude(),
                    arc.getOffX(),
                    arc.getOffY(),
                    arc.getWidth(),
                    arc.getHeight(),
                    arc.getStartAngle(),
View Full Code Here

                unit = Length.NM;
                break;
            default:
            }

            arc = new OMArc(new LatLonPoint(lat, lon), radius, unit, nverts, start, extent);
            break;
        case RENDERTYPE_XY:
            x = dis.readInt();
            y = dis.readInt();
            w = dis.readInt();
View Full Code Here

TOP

Related Classes of com.bbn.openmap.LatLonPoint

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.