Examples of TileLodInfo


Examples of com.gi.engine.server.service.TileLodInfo

    for (int i = 0, count = app.getCheckListLods().getModel().getSize(); i < count; i++) {
      JCheckBox chk = (JCheckBox) app.getCheckListLods().getModel()
          .getElementAt(i);
      if (chk.isSelected()) {
        TileLodInfo tileLodInfo = app.getTileInfo().getTileLodInfo(i);
        double resolution = tileLodInfo.getResolution();
        double deltaX = width * resolution;
        double deltaY = height * resolution;
        int colMin = (int) ((fullExtent.getMinX() - originX) / deltaX);
        colMin = colMin < 0 ? 0 : colMin;
        int colMax = (int) ((fullExtent.getMaxX() - originX) / deltaX) + 1;
View Full Code Here

Examples of com.gi.engine.server.service.TileLodInfo

          tileInfo.setOriginY(objOrigin.getDouble("y"));
          JSONArray array = objTileInfo.getJSONArray("lods");
          int count = array.length();
          for (int i = 0; i < count; i++) {
            JSONObject obj = array.getJSONObject(i);
            TileLodInfo tileLodInfo = new TileLodInfo();
            tileLodInfo.setLevel(obj.getInt("level"));
            tileLodInfo.setScale(obj.getDouble("scale"));
            tileLodInfo.setResolution(obj.getDouble("resolution"));
            tileInfo.addTileLodInfo(tileLodInfo);
          }

          Object[] levels = new Object[count];
          for (int i = 0, size = tileInfo.getTileLodInfos().size(); i < size; i++) {
            TileLodInfo info = tileInfo.getTileLodInfo(i);
            JCheckBox checkBox = new JCheckBox();
            checkBox.setText(info.getLevel() + " 1:"
                + info.getScale());
            levels[i] = checkBox;
          }
          final DefaultComboBoxModel model = new DefaultComboBoxModel(
              levels);
          checkListLods.setModel(model);
View Full Code Here

Examples of com.gi.engine.server.service.TileLodInfo

    for (int i = 0, count = checkListLods.getModel().getSize(); i < count; i++) {
      JCheckBox chk = (JCheckBox) checkListLods.getModel()
          .getElementAt(i);
      if (chk.isSelected()) {
        TileLodInfo tileLodInfo = tileInfo.getTileLodInfo(i);
        double resolution = tileLodInfo.getResolution();
        double deltaX = width * resolution;
        double deltaY = height * resolution;
        int colMin = (int) ((fullExtent.getMinX() - originX) / deltaX);
        colMin = colMin < 0 ? 0 : colMin;
        int colMax = (int) ((fullExtent.getMaxX() - originX) / deltaX) + 1;
View Full Code Here

Examples of com.gi.engine.server.service.TileLodInfo

          if ("png".equals(lowFormat)) {
            supportTransparent = true;
          }

          // Calculate the spread tile bbox
          TileLodInfo tileLodInfo = tileInfo.getTileLodInfo(level);
          double resolution = tileLodInfo.getResolution();
          double deltaX = width * resolution;
          double deltaY = height * resolution;
          double xmin = originX + deltaX * colMin;
          double ymax = originY - deltaY * rowMin;
          double xmax = xmin + deltaX * createSpread;
 
View Full Code Here

Examples of com.gi.engine.server.service.TileLodInfo

        arrayTemp = new JSONArray();
        ArrayList<TileLodInfo> tileLodDescs = tileInfo
            .getTileLodInfos();
        int lodCount = tileLodDescs.size();
        for (int i = 0; i < lodCount; i++) {
          TileLodInfo tileLodDesc = tileLodDescs.get(i);
          objTemp2 = new JSONObject();
          objTemp2.put("level", tileLodDesc.getLevel());
          objTemp2.put("resolution", tileLodDesc.getResolution());
          objTemp2.put("scale", tileLodDesc.getScale());
          arrayTemp.put(objTemp2);
        }
        objTemp.put("lods", arrayTemp);
        obj.put("tileInfo", objTemp);
      }
View Full Code Here

Examples of com.gi.engine.server.service.TileLodInfo

            .getTileLodInfos();
        int lodCount = tileLodDescs.size();
        sb.append("<li><b>Levels: </b> (" + lodCount + ")</li>");
        sb.append("<ul>");
        for (int i = 0; i < lodCount; i++) {
          TileLodInfo tileLodInfo = tileLodDescs.get(i);
          int level = tileLodInfo.getLevel();
          double resolution = tileLodInfo.getResolution();
          int startRow = (int) ((originY - ymaxFull) / height / resolution);
          int startCol = (int) ((xminFull - originX) / width / resolution);
          int endRow = (int) ((originY - yminFull) / height / resolution);
          int endCol = (int) ((xmaxFull - originX) / width / resolution);
          sb.append("<li><b>Level: </b>" + level);
          sb.append(" [ ");
          sb.append("<a href='" + contextRoot
              + "/rest/service/MapService/" + serviceName
              + "/tile/" + level + "/" + startRow + "/"
              + startCol + "'>Start Tile</a>");
          sb.append(" , ");
          sb.append("<a href='" + contextRoot
              + "/rest/service/MapService/" + serviceName
              + "/tile/" + level + "/" + endRow + "/" + endCol
              + "'>End Tile</a>");
          sb.append(" ]");
          sb.append("<ul>");
          sb.append("Resolution: " + resolution + "<br/>");
          sb.append("Scale: " + tileLodInfo.getScale());
          sb.append("</ul>");
          sb.append("</li>");
        }
        sb.append("</ul>");
        sb.append("</ul>");
View Full Code Here

Examples of com.gi.engine.server.service.TileLodInfo

      int width = app.getMapPane().getWidth();
      int height = app.getMapPane().getHeight();
      int dpi = Integer.valueOf(this.jTextFieldDPI.getText());
      double resolution = map.computeResolution(env, width, height);
      double scale = map.computeScale(env, width, height, dpi);
      TileLodInfo info = new TileLodInfo();
      info.setResolution(resolution);
      info.setScale(scale);
      LodItem item = new LodItem();
      item.setTileLodInfo(info);

      int count = jListLevelsModel.getSize();
      int index = count;
View Full Code Here

Examples of com.gi.engine.server.service.TileLodInfo

            .valueOf(tileInfo.getWidth()));
        this.jTextFieldHeight.setText(String.valueOf(tileInfo
            .getHeight()));
        jListLevelsModel.removeAllElements();
        for (int i = 0, count = tileInfo.getTileLodInfos().size(); i < count; i++) {
          TileLodInfo tileLodInfo = tileInfo.getTileLodInfos().get(i);
          LodItem item = new LodItem();
          item.setTileLodInfo(tileLodInfo);
          jListLevelsModel.addElement(item);
        }
      }
View Full Code Here

Examples of com.gi.engine.server.service.TileLodInfo

            .getText()));
        tileInfo.setHeight(Integer.valueOf(this.jTextFieldHeight
            .getText()));
        for (int i = 0, count = jListLevelsModel.getSize(); i < count; i++) {
          LodItem item = (LodItem) jListLevelsModel.getElementAt(i);
          TileLodInfo tileLodInfo = item.getTileLodInfo();
          tileLodInfo.setLevel(i);
          tileInfo.addTileLodInfo(tileLodInfo);
        }

        desc.setTileInfo(tileInfo);
      }
View Full Code Here

Examples of com.gi.engine.server.service.TileLodInfo

      int dpi = Integer.valueOf(this.jTextFieldDPI.getText());
      double maxResolution = map
          .computeResolution(fullEnv, width, height);
      double maxScale = map.computeScale(fullEnv, width, height, dpi);
      for (int i = 0; i < num; i++) {
        TileLodInfo info = new TileLodInfo();
        double factor = Math.pow(2, i);
        info.setResolution(maxResolution / factor);
        info.setScale(maxScale / factor);

        LodItem item = new LodItem();
        item.setTileLodInfo(info);
        jListLevelsModel.addElement(item);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.