Package org.postgis

Examples of org.postgis.Point


          PGGeom bean = new PGGeom();
          bean.type = geom.getType();
          bean.xyCoords = new double[numPoints * 2];
          for (int j = 0; j < numPoints; j++)
          {
            Point pt = geom.getPoint(j);
            bean.xyCoords[j * 2] = pt.x;
            bean.xyCoords[j * 2 + 1] = pt.y;
          }
          geometricData.add(bean);
        }
View Full Code Here


   * @param longitude
   *            The longitude measured in degrees.
   * @return The Point object.
   */
  public Point createPoint(double latitude, double longitude) {
    Point result;
   
    result = new Point(longitude, latitude);
    result.srid = 4326;
   
    return result;
  }
View Full Code Here

    // GeomFromText('POLYGON((144.93912192855174 -37.82981987499741,
    // 144.93912192855174 -37.79310006709244, 144.98188026000003
    // -37.79310006709244, 144.98188026000003 -37.82981987499741,
    // 144.93912192855174 -37.82981987499741))', -1)
    bboxPoints = new Point[5];
    bboxPoints[0] = new Point(left, bottom);
    bboxPoints[1] = new Point(left, top);
    bboxPoints[2] = new Point(right, top);
    bboxPoints[3] = new Point(right, bottom);
    bboxPoints[4] = new Point(left, bottom);
    bboxPolygon = polygonBuilder.createPolygon(bboxPoints);
   
    // Select all nodes inside the box into the node temp table.
    LOG.finer("Selecting all nodes inside bounding box.");
    rowCount = jdbcTemplate.update(
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public Node mapRow(ResultSet rs, int rowNumber) throws SQLException {
    PGgeometry geom;
    Point point;
   
    geom = (PGgeometry) rs.getObject("geom");
    point = (Point) geom.getGeometry();
   
    return new Node(mapCommonEntityData(rs), point.y, point.x);
View Full Code Here

      // GeomFromText('POLYGON((144.93912192855174 -37.82981987499741,
      // 144.93912192855174 -37.79310006709244, 144.98188026000003
      // -37.79310006709244, 144.98188026000003 -37.82981987499741,
      // 144.93912192855174 -37.82981987499741))', -1)
      bboxPoints = new Point[5];
      bboxPoints[0] = new Point(left, bottom);
      bboxPoints[1] = new Point(left, top);
      bboxPoints[2] = new Point(right, top);
      bboxPoints[3] = new Point(right, bottom);
      bboxPoints[4] = new Point(left, bottom);
      bboxPolygon = polygonBuilder.createPolygon(bboxPoints);
     
      // Instantiate the mapper for converting between entity types and
      // member type values.
      memberTypeValueMapper = new MemberTypeValueMapper();
View Full Code Here

    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;
View Full Code Here

     *             Id of the node.
     * @return Point object
     */
    public Point createPoint(long nodeId) {
      NodeLocation nodeLocation = locationStore.getNodeLocation(nodeId);
        Point point = new Point(nodeLocation.getLongitude(), nodeLocation.getLatitude());
        point.srid = 4326;

        return point;
    }
View Full Code Here

     
      nodeLocation = locationStore.getNodeLocation(wayNode.getNodeId());
 
      if (nodeLocation.isValid()) {
        numValidNodes++;
        linePoints.add(new Point(nodeLocation.getLongitude(), nodeLocation.getLatitude()));
      } else {
        return null;
      }
    }
 
View Full Code Here

    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;
View Full Code Here

     *             Id of the node.
     * @return Point object
     */
    public Point createPoint(long nodeId) {
      NodeLocation nodeLocation = locationStore.getNodeLocation(nodeId);
        Point point = new Point(nodeLocation.getLongitude(), nodeLocation.getLatitude());
        point.srid = 4326;

        return point;
    }
View Full Code Here

TOP

Related Classes of org.postgis.Point

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.