Examples of lon()


Examples of org.gwtopenmaps.openlayers.client.LonLat.lon()

    for (int i = 0; i < 40; i++) {
      angle += 360 / 40;
      double radius = storeBinder.getModel().getRadius();
      LonLat lonLat = LonLat.narrowToLonLat(destinationVincenty(center.lon(), center.lat(), angle, radius));
      lonLat.transform("EPSG:4326", map.getProjection());
      points[i] = new Point(lonLat.lon(), lonLat.lat());
    }
    LinearRing ring = new LinearRing(points);
    Polygon polygon = new Polygon(new LinearRing[]{ring});

    vectorLayer.addFeature(new VectorFeature(polygon));
View Full Code Here

Examples of org.openstreetmap.josm.data.coor.LatLon.lon()

    static protected Bounds extend(Bounds bbox, double amount) {
        LatLon min = bbox.getMin();
        LatLon max = bbox.getMax();

        double dLat = Math.abs(max.lat() - min.lat()) * amount;
        double dLon = Math.abs(max.lon() - min.lon()) * amount;

        return new Bounds(min.lat() - dLat, min.lon() - dLon, max.lat() + dLat, max.lon() + dLon);
    }

}
View Full Code Here

Examples of org.openstreetmap.josm.data.coor.LatLon.lon()

        LatLon max = bbox.getMax();

        double dLat = Math.abs(max.lat() - min.lat()) * amount;
        double dLon = Math.abs(max.lon() - min.lon()) * amount;

        return new Bounds(min.lat() - dLat, min.lon() - dLon, max.lat() + dLat, max.lon() + dLon);
    }

}
View Full Code Here

Examples of org.openstreetmap.josm.data.coor.LatLon.lon()

    for (int i = 0; i < newPositions.length; i++) {
      LatLon p0 = newPositions[i];
      LatLon p1 = newPositions[0];
      if (i + 1 != newPositions.length)
        p1 = newPositions[i + 1];
      double dx = p1.lon() - p0.lon();
      double dy = p1.lat() - p0.lat();
      for (int j = 0; j < fold; j++) {
        positions[i * fold + j] = new LatLon(p0.lat()
            + (dy * (j / ((double) fold))), p0.lon()
            + (dx * (j / ((double) fold))));
View Full Code Here

Examples of org.openstreetmap.josm.data.coor.LatLon.lon()

          EastNorth en = u.latlon2eastNorth(ll);
          position = String.format("x: %.1f y: %.1f", en.getX(), en
              .getY());
        } else {
          position = String.format("Lat: %.4f Lon: %.4f", ll.lat(),
              ll.lon());
        }

        posField.setText(position);
        validate();
      }
View Full Code Here

Examples of org.openstreetmap.josm.data.coor.LatLon.lon()

     */
    public EastNorth latlon2eastNorth(LatLon p) {
        // translate ellipsoid GRS80 (WGS83) => Clark
        LatLon geo = GRS802Clark(p);
        double lt = geo.lat(); // in radian
        double lg = geo.lon();

        // check if longitude and latitude are inside the French Lambert zones
        currentZone = 0;
        boolean outOfLambertZones = false;
        if (lt >= zoneLimits[3] && lt <= cMaxLatZone1 && lg >= cMinLonZones && lg <= cMaxLonZones) {
View Full Code Here

Examples of org.openstreetmap.josm.data.coor.LatLon.lon()

            geo = Geographic(p, Xs[currentZone], Ys[currentZone], c[currentZone], n[currentZone]);
        else
            geo = Geographic(p, Xs[layoutZone], Ys[layoutZone], c[layoutZone], n[layoutZone]);
        // translate ellipsoid Clark => GRS80 (WGS83)
        LatLon wgs = Clark2GRS80(geo);
        return new LatLon(Math.toDegrees(wgs.lat()), Math.toDegrees(wgs.lon()));
    }

    @Override public String toString() {
        return tr("Lambert Zone (France)");
    }
View Full Code Here

Examples of org.openstreetmap.josm.data.coor.LatLon.lon()

            f.setCreador(Authentication.getUsuario());
            LatLon from = mapViewLocal.getLatLon(mouseEvent.getX(),
                mouseEvent.getY());
            GeometryFactory gf = new GeometryFactory();
            f.setGeometria(gf.createPoint(new Coordinate(
                from.lon(), from.lat())));
            IncidenceDialog id = new IncidenceDialog(
                f,
                i18n.getString("Incidences.summary.title")
                    + " "
                    + i18n.getString("Incidences.nuevaIncidencia"),
View Full Code Here

Examples of org.openstreetmap.josm.data.coor.LatLon.lon()

            return;
        LatLon minLatlon = Main.getProjection().eastNorth2latlon(bounds.getMin());
        LatLon maxLatlon = Main.getProjection().eastNorth2latlon(bounds.getMax());
        bounds = new ProjectionBounds(
                Main.getProjection().latlon2eastNorth(new LatLon(minLatlon.lat() - enlargeDegree, minLatlon.lon() - enlargeDegree)),
                Main.getProjection().latlon2eastNorth(new LatLon(maxLatlon.lat() + enlargeDegree, maxLatlon.lon() + enlargeDegree)));
    }

    /**
     * Enlarges the bounding box up to <code>maxEnlargePercent</code>, depending on
     * its size. If the bounding box is small, it will be enlarged more in relation
View Full Code Here

Examples of org.openstreetmap.josm.data.coor.LatLon.lon()

    public BBox(Node n) {
        LatLon coor = n.getCoor();
        if (coor == null) {
            xmin = xmax = ymin = ymax = 0;
        } else {
            xmin = xmax = coor.lon();
            ymin = ymax = coor.lat();
        }
    }

    private void sanity()  {
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.