Package de.fhpotsdam.unfolding.core

Examples of de.fhpotsdam.unfolding.core.Coordinate


    }
  }

  public static Coordinate fromYahoo(Coordinate coord) {
    // Return column, row, zoom for Yahoo x, y, z.
    return new Coordinate((int) PApplet.pow(2, 18 - coord.zoom - 1), coord.column, 18 - coord.zoom);
  }
View Full Code Here


    return new Coordinate((int) PApplet.pow(2, 18 - coord.zoom - 1), coord.column, 18 - coord.zoom);
  }

  public static Coordinate toYahoo(Coordinate coord) {
    // Return x, y, z for Yahoo tile column, row, zoom.
    return new Coordinate((int) PApplet.pow(2, coord.zoom - 1) - coord.row - 1, coord.column, 18 - coord.zoom);
  }
View Full Code Here

  }

  public Coordinate locationCoordinate(Location location) {
    PVector point = new PVector(PApplet.PI * location.y / 180.0f, PApplet.PI * location.x / 180.0f);
    point = this.project(point);
    return new Coordinate(point.y, point.x, this.zoom);
  }
View Full Code Here

    size(800, 600);

    map = new UnfoldingMap(this);
    Location location = new Location(52.52, 13.38);

    Coordinate coord = map.mapDisplay.getMapProvider().locationCoordinate(location).zoomTo(14);
    String quadKey = Microsoft.toQuadKey(coord);
    println("QuadKey: " + quadKey + " for location: " + location);

    String hereAPIUriString = "http://traffic.cit.api.here.com/traffic/6.1/flow.json?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg&quadkey=";
    hereAPIUriString += quadKey;
View Full Code Here

  }

  private void printInfo(String info, Location location, ScreenPosition pos) {
    System.out.printf(info + " : lat = %.9f lon = %.9f x = %.9f y = %.9f \n", location.getLat(), location.getLon(),
        pos.x, pos.y);
    Coordinate coord = map.mapDisplay.getMapProvider().locationCoordinate(location).zoomTo(0);
    System.out.printf("\tcoord : col = %.9f row = %.9f \n", coord.column, coord.row);

    // from AbstractProjection#locationCoordinate
    PVector point1 = new PVector(PApplet.PI * location.y / 180.0f, PApplet.PI * location.x / 180.0f);
    System.out.printf("\tpoint1 : x = %.9f y = %.9f \n", point1.x, point1.y);
View Full Code Here

TOP

Related Classes of de.fhpotsdam.unfolding.core.Coordinate

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.