Package de.fhpotsdam.unfolding.geo

Examples of de.fhpotsdam.unfolding.geo.Location


    p.textFont(font);
    p.textSize(11);
    String zoomStr = String.valueOf(map.getZoomLevel());
    String mouseXStr = String.valueOf(p.mouseX) + "px";
    String mouseYStr = String.valueOf(p.mouseY) + "px";
    Location mouseLoc = map.getLocation(p.mouseX, p.mouseY);
    String mouseLatStr = PApplet.nf(mouseLoc.getLat(), 1, 3) + "°";
    String mouseLngStr = PApplet.nf(mouseLoc.getLon(), 1, 3) + "°";

    String rendererFQNStr = p.g.getClass().toString();
    String rendererStr = rendererFQNStr.substring(rendererFQNStr.lastIndexOf('.') + 1);

    String fpsStr = String.valueOf(PApplet.round(p.frameRate));
View Full Code Here


    size(650, 440, OPENGL);

    // INIT UNFOLDING
    map = new UnfoldingMap(this);
    map.zoomAndPanTo(new Location(52.5f, 13.4f), 10);
    MapUtils.createDefaultEventDispatcher(this, map);

    // INIT GEONAMES
    WebService.setUserName("username"); // add your username here
    searchCriteria.setMaxRows(1);
View Full Code Here

  public void draw() {
    background(0);
    map.updateMap();
    map.draw();
    Location loc = new Location(52.5f, 13.4f);

    // GEONAMES EVENT
    if (searchEvent == true) {
      searchCriteria.setQ(myTextfield.getStringValue());
View Full Code Here

    lon2 = (lon2 + 3 * Math.PI) % (2 * Math.PI) - Math.PI;

    float lat2d = (float) Math.toDegrees(lat2);
    float lon2d = (float) Math.toDegrees(lon2);

    return new Location(lat2d, lon2d);
  }
View Full Code Here

   */
  public static Location getDecimal(float latDegrees, float latMinutes, float latSeconds, String latDirection,
      Integer lonDegrees, Integer lonMinutes, Integer lonSeconds, String lonDirection) {
    float lat = getLatitudeDecimal(latDegrees, latMinutes, latSeconds, latDirection);
    float lon = getLongitudeDecimal(lonDegrees, lonMinutes, lonSeconds, lonDirection);
    return new Location(lat, lon);
  }
View Full Code Here

   * list.
   *
   * @return The centroid location.
   */
  public static Location getEuclideanCentroid(List<Location> locations) {
    Location center = new Location(0, 0);
    for (Location loc : locations) {
      center.add(loc);
    }
    center.div((float) locations.size());
    return center;
  }
View Full Code Here

      cy = cy + (vi0.y + vi1.y) * (vi0.x * vi1.y - vi0.y * vi1.x);
    }
    float area = getArea(vertices);
    cx /= (6f * area);
    cy /= (6f * area);
    return new Location(cx, cy);
  }
View Full Code Here

      return originalVertices;
    }

    List<Location> vertices = new ArrayList<Location>(originalVertices.size() + 1);
    for (int i = 0; i < originalVertices.size(); i++) {
      vertices.add(new Location(0f, 0f));
    }
    Collections.copy(vertices, originalVertices);
    if (vertices.size() > 1) {
      if (!vertices.get(0).equals(vertices.get(vertices.size() - 1))) {
        // Add first vertex on last position to close polygon
View Full Code Here

  protected boolean hidden;
  /** The ID of this marker. */
  protected String id;

  public AbstractMarker() {
    this(new Location(0, 0), null);
  }
View Full Code Here

    this.location = location;
  }

  @Override
  public void setLocation(float lat, float lon) {
    setLocation(new Location(lat, lon));
  }
View Full Code Here

TOP

Related Classes of de.fhpotsdam.unfolding.geo.Location

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.