Package de.lmu.ifi.dbs.elki.data.spatial

Examples of de.lmu.ifi.dbs.elki.data.spatial.Polygon


   */
  public Polygon getHull() {
    if(!ok) {
      computeConvexHull();
    }
    return new Polygon(points, minmaxX.getMin(), minmaxX.getMax(), minmaxY.getMin(), minmaxY.getMax());
  }
View Full Code Here


        }
      }
      // Polygon separator.
      if(cur.equals(POLYGON_SEPARATOR)) {
        if(coords.size() > 0) {
          polys.add(new Polygon(coords));
          coords = new ArrayList<Vector>();
        }
        continue;
      }
      // Label
      labels.add(cur);
    }
    // Complete polygon
    if(coords.size() > 0) {
      polys.add(new Polygon(coords));
    }
    // Use first label as eternal ID
    ExternalID eid = labels.size() > 0 ? new ExternalID(labels.remove(0)) : null;
    return new Object[] { new PolygonsObject(polys), labels, eid };
  }
View Full Code Here

   */
  public Polygon getHull() {
    if(!ok) {
      computeConvexHull();
    }
    return new Polygon(points, minmaxX.getMin(), minmaxX.getMax(), minmaxY.getMin(), minmaxY.getMax());
  }
View Full Code Here

          processNeighbor(cur, used, i, tri.ab, tri.b);
          processNeighbor(cur, used, i, tri.bc, tri.c);
          processNeighbor(cur, used, i, tri.ca, tri.a);
        }
        if(cur.size() > 0) {
          polys.add(new Polygon(cur));
          cur = new ArrayList<Vector>();
        }
      }
    }
View Full Code Here

      Vector v = points.get(pair.first);
      hullp.add(v);
      minmaxX.put(v.get(0));
      minmaxY.put(v.get(1));
    }
    return new Polygon(hullp, minmaxX.getMin(), minmaxX.getMax(), minmaxY.getMin(), minmaxY.getMax());
  }
View Full Code Here

        }
      }
      // Polygon separator.
      if(cur.equals(POLYGON_SEPARATOR)) {
        if(coords.size() > 0) {
          polys.add(new Polygon(coords));
          coords = new ArrayList<Vector>();
        }
        continue;
      }
      // First label will become the External ID
      if(eid == null) {
        eid = new ExternalID(cur);
      }
      else {
        // Label
        if(labels == null) {
          labels = new LabelList(1);
        }
        labels.add(cur);
      }
    }
    // Complete polygon
    if(coords.size() > 0) {
      polys.add(new Polygon(coords));
    }
    return new Object[] { new PolygonsObject(polys), labels, eid };
  }
View Full Code Here

TOP

Related Classes of de.lmu.ifi.dbs.elki.data.spatial.Polygon

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.