Package de.fhpotsdam.unfolding.data

Examples of de.fhpotsdam.unfolding.data.MultiFeature


    case LINES:
    case POLYGON:
      location = GeoUtils.getCentroid(((ShapeFeature) feature).getLocations());
      break;
    case MULTI:
      MultiFeature multiFeature = ((MultiFeature) feature);
      if (useLargestForMulti) {
        // Return centroid of largest feature
        Feature largestFeature = getLargestFeature(multiFeature);
        location = getCentroid(largestFeature);

      } else {

        // Return centroid of all features
        List<Location> locations = new ArrayList<Location>();
        for (Feature f : multiFeature.getFeatures()) {
          Location l = getCentroid(f);
          locations.add(l);
        }
        location = GeoUtils.getCentroid(locations);
      }
View Full Code Here


    if (feature.getType() == Feature.FeatureType.LINES || feature.getType() == Feature.FeatureType.POLYGON) {
      ShapeFeature sf = (ShapeFeature) feature;
      locations.addAll(sf.getLocations());
    }
    if (feature.getType() == Feature.FeatureType.MULTI) {
      MultiFeature multiFeature = (MultiFeature) feature;
      for (Feature f : multiFeature.getFeatures()) {
        locations.addAll(getLocations(f));
      }
    }
    return locations;
  }
View Full Code Here

TOP

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

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.