Package de.fhpotsdam.unfolding.data

Examples of de.fhpotsdam.unfolding.data.PointFeature


   * @return A list of locations.
   */
  public static List<Location> getLocations(Feature feature) {
    List<Location> locations = new ArrayList<Location>();
    if (feature.getType() == Feature.FeatureType.POINT) {
      PointFeature pf = (PointFeature) feature;
      locations.add(pf.getLocation());
    }
    if (feature.getType() == Feature.FeatureType.LINES || feature.getType() == Feature.FeatureType.POLYGON) {
      ShapeFeature sf = (ShapeFeature) feature;
      locations.addAll(sf.getLocations());
    }
View Full Code Here


  public List<Marker> createLabeledMarkers(List<Feature> features) {
    PFont font = loadFont("ui/OpenSans-12.vlw");
    List<Marker> markers = new ArrayList<Marker>();
    for (Feature feature : features) {
      String label = feature.getStringProperty("title");
      PointFeature pointFeature = (PointFeature) feature;
      Marker marker = new LabeledMarker(pointFeature.getLocation(), label, font, 15);
      markers.add(marker);
    }
    return markers;
  }
View Full Code Here

   
    fill(255, 0, 0, 100);
    noStroke();
    float maxSize = map(map.getZoomLevel(), 0, 6, 4, 40);
    for (Feature feature : features) {
      PointFeature pf = (PointFeature) feature;
      ScreenPosition pos = map.getScreenPosition(pf.getLocation());
      pushMatrix();
      translate(pos.x, pos.y);
      float magnitude = (Float) feature.getProperty("magnitude");
      if (useColorCoding) {
        int color = mapToColor(magnitude);
View Full Code Here

   
    fill(255, 0, 0, 100);
    noStroke();
    float maxSize = map(map.getZoomLevel(), 0, 6, 4, 40);
    for (Feature feature : features) {
      PointFeature pf = (PointFeature) feature;
      ScreenPosition pos = map.getScreenPosition(pf.getLocation());
      float magnitude = (Float) feature.getProperty("magnitude");
      float s = map(magnitude, 4, 8, 4, maxSize);
      beginShape(QUAD);
      vertex(pos.x, pos.y, 5);
      vertex(pos.x + s, pos.y, 5);
View Full Code Here

TOP

Related Classes of de.fhpotsdam.unfolding.data.PointFeature

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.