Exemple #1
0
  private void updateState(WMSRequest request) {
    b =
        new ProjectionBounds(
            layer.getEastNorth(request.getXIndex(), request.getYIndex()),
            layer.getEastNorth(request.getXIndex() + 1, request.getYIndex() + 1));
    if (b.min != null && b.max != null && WMSLayer.PROP_OVERLAP.get()) {
      double eastSize = b.max.east() - b.min.east();
      double northSize = b.max.north() - b.min.north();

      double eastCoef = WMSLayer.PROP_OVERLAP_EAST.get() / 100.0;
      double northCoef = WMSLayer.PROP_OVERLAP_NORTH.get() / 100.0;

      this.b =
          new ProjectionBounds(
              new EastNorth(b.min.east(), b.min.north()),
              new EastNorth(
                  b.max.east() + eastCoef * eastSize, b.max.north() + northCoef * northSize));
    }

    this.proj = Main.proj;
    this.pixelPerDegree = request.getPixelPerDegree();
    this.request = request;
  }