コード例 #1
0
ファイル: GMLMultiPoint.java プロジェクト: maduhu/gaeaplus
  @Override
  protected Sector calculateSector() {
    Sector sector = null;

    for (GMLPoint point : getPoints()) sector = Sector.union(sector, point.getSector());

    return sector;
  }
コード例 #2
0
  public static Sector union(Sector sectorA, Sector sectorB) {
    if (sectorA == null || sectorB == null) {
      if (sectorA == sectorB) {
        return sectorA;
      }

      return sectorB == null ? sectorA : sectorB;
    }

    return sectorA.union(sectorB);
  }
コード例 #3
0
  public Sector getBBox() {
    if (null != this.coverage) return this.coverage;

    this.coverage = Sector.EMPTY_SECTOR;
    MapSource myMapSource = this.mapSource;
    for (Iterator<MapSource> iterator = myMapSource.getChildren(); iterator.hasNext(); ) {
      MapSource ms = iterator.next();
      try {
        MapGenerator gen = (null != ms) ? ms.getMapGenerator() : null;
        if (null != gen) {
          Sector bbox = gen.getBBox();
          if (null != bbox) this.coverage = Sector.union(this.coverage, bbox);
        }
      } catch (Exception e) {
        Logging.logger()
            .severe(
                "CompoundImageryGenerator:getBBox: undefined coverage of child map source"
                    + ms.getName());
      }
    }
    return this.coverage;
  }