Package org.postgis

Examples of org.postgis.Polygon


   * @param points
   *            The points to build a polygon from.
   * @return The Polygon object.
   */
  public Polygon createPolygon(Point[] points) {
    Polygon result;
   
    result = new Polygon(new LinearRing[] {new LinearRing(points)});
    result.srid = 4326;
   
    return result;
  }
View Full Code Here


  @Override
  public ReleasableIterator<EntityContainer> iterateBoundingBox(
      double left, double right, double top, double bottom, boolean completeWays) {
    List<Bound> bounds;
    Point[] bboxPoints;
    Polygon bboxPolygon;
    int rowCount;
    List<ReleasableIterator<EntityContainer>> resultSets;
   
    if (!initialized) {
      initialize();
View Full Code Here

      double left, double right, double top, double bottom, boolean completeWays) {
    List<Bound> bounds;
    PreparedStatement preparedStatement = null;
    int prmIndex;
    Point[] bboxPoints;
    Polygon bboxPolygon;
    MemberTypeValueMapper memberTypeValueMapper;
    int rowCount;
    List<ReleasableIterator<EntityContainer>> resultSets;
   
    if (!initialized) {
View Full Code Here

    }
 
  private Polygon createWayBbox(double left, double right, double bottom, double top) {
    Point[] points;
    LinearRing ring;
    Polygon bbox;
   
    points = new Point[5];
    points[0] = new Point(left, bottom);
    points[1] = new Point(left, top);
    points[2] = new Point(right, top);
    points[3] = new Point(right, bottom);
    points[4] = new Point(left, bottom);
   
    ring = new LinearRing(points);
   
    bbox = new Polygon(new LinearRing[] {ring});
    bbox.srid = 4326;
   
    return bbox;
  }
View Full Code Here

    }
 
  private Polygon createWayBbox(double left, double right, double bottom, double top) {
    Point[] points;
    LinearRing ring;
    Polygon bbox;
   
    points = new Point[5];
    points[0] = new Point(left, bottom);
    points[1] = new Point(left, top);
    points[2] = new Point(right, top);
    points[3] = new Point(right, bottom);
    points[4] = new Point(left, bottom);
   
    ring = new LinearRing(points);
   
    bbox = new Polygon(new LinearRing[] {ring});
    bbox.srid = 4326;
   
    return bbox;
  }
View Full Code Here

        int count = data.getInt();
        LinearRing[] rings = new LinearRing[count];
        for (int i = 0; i < count; i++) {
            rings[i] = parseLinearRing(data, haveZ, haveM);
        }
        return new Polygon(rings);
    }
View Full Code Here

        System.out.println();

        System.out.println("Polygon Test:");
        System.out.println("\t" + plg_str);
        Polygon plg = new Polygon(plg_str);
        System.out.println("\t" + plg.toString());

        System.out.println();

        System.out.println("MultiPolygon Test:");
        System.out.println("\t" + mplg_str);
View Full Code Here

   * @param points
   *            The points to build a polygon from.
   * @return The Polygon object.
   */
  public Polygon createPolygon(Point[] points) {
    Polygon result;
   
    result = new Polygon(new LinearRing[] {new LinearRing(points)});
    result.srid = 4326;
   
    return result;
  }
View Full Code Here

TOP

Related Classes of org.postgis.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.