Package chunmap.model.elem

Examples of chunmap.model.elem.Envelope


        + "," + env.getMaxY();
  }

  public Envelope getEnvelop() {
    // TODO wms envelope
    return new Envelope(92.37175137842411, 31.01897163866643,
        108.8716402641172, 44.2188827472209);
  }
View Full Code Here


  private void getBody(PrintStream out, Layer layer)
      throws IOException {
    out.println("  <Layer>");
    out.println("    <Name>" + layer.getName() + "</Name>");
    out.println("      <Title>" + layer.getName() + "</Title>");
    Envelope env = layer.getEnvelop();
    out.println("      <LatLongBoundingBox minx=\"" + env.getMinX()
        + "\" miny=\"" + env.getMinY() + "\" maxx=\"" + env.getMaxX()
        + "\" maxy=\"" + env.getMaxY() + "\" />");

    // do not support style
    // out.println("      <Style>");
    // out.println("        <Name>" + "?" + "</Name>");
    // out.println("        <Title>" + "?" + "</Title>");
View Full Code Here

    return "POINT(" + getX() + " " + getY() + ")";
  }

  @Override
  protected Envelope calculateEnvelop() {
    return new Envelope(getX(), getY(), getX(), getY());
  }
View Full Code Here

  }

  public void mouseDragged(MouseEvent e) {
    if (e.isMetaDown()) return;
   
    envelope=new Envelope(x,y,e.getX(),e.getY());
    int minx = (int)envelope.getMinX();
    int miny = (int)envelope.getMinY();
    int width = (int)envelope.getWidth();
    int height = (int)envelope.getHeight();
View Full Code Here

    double d = 5d;
    double minx = x - d;
    double miny = y - d;
    double maxx = x + d;
    double maxy = y + d;
    Envelope env = new Envelope(minx, miny, maxx, maxy);
    Transform trans = map.getView().screen2World();
    Envelope env2 = env.transform(trans);
    select(env2);
  }
View Full Code Here

  @Override
  public Envelope getEnvelop() {
    String sql = "SELECT EXTENT(" + geomColumn + ") FROM " + tableName;
    String str = pgSql.executeScalar(sql).toString();
    Envelope ep = wkt.readEnvelop(str);
    return ep;
  }
View Full Code Here

  @Override
  public Envelope getShapeEnvelop(long id) {
    String sql = "SELECT EXTENT(" + geomColumn + ") FROM " + tableName
        + " WHERE " + IdColumn + "=" + id;
    String str = pgSql.executeScalar(sql).toString();
    Envelope ep = wkt.readEnvelop(str);
    return ep;
  }
View Full Code Here

public class ZoomInBoxTool extends RectangleTool{

  @Override
  public void finished() {
    Envelope newEnv=envelope.transform(map.getView().screen2World());
    ExtentCommand cmd = new ExtentCommand(map, newEnv);
    map.executeCommand(cmd);
    map.refreshMap();
  }
View Full Code Here

      throws ServletException, IOException {
    layer = request.getParameter("QUERY_LAYER");
    PrintStream out = new PrintStream(response.getOutputStream());

    String bbox = request.getParameter("BBOX");
    Envelope envelop = parseEnvelop(bbox);

    String s = select(envelop);
    out.write(s.getBytes(Charset.forName("UTF-8")));
  }
View Full Code Here

    double minx = Double.valueOf(ss[0]);
    double miny = Double.valueOf(ss[1]);
    double maxx = Double.valueOf(ss[2]);
    double maxy = Double.valueOf(ss[3]);

    Envelope envelop = new Envelope(minx, miny, maxx, maxy);
    return envelop;
  }
View Full Code Here

TOP

Related Classes of chunmap.model.elem.Envelope

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.