Package org.postgis

Examples of org.postgis.Point


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


    }

    private Point parsePoint(ValueGetter data, boolean haveZ, boolean haveM) {
        double X = data.getDouble();
        double Y = data.getDouble();
        Point result;
        if (haveZ) {
            double Z = data.getDouble();
            result = new Point(X, Y, Z);
        } else {
            result = new Point(X, Y);
        }

        if (haveM) {
            result.setM(data.getDouble());
        }

        return result;
    }
View Full Code Here

        System.out.println();

        System.out.println("Point Test:");
        System.out.println("\t" + ptg_str);
        Point ptg = new Point(ptg_str);
        System.out.println("\t" + ptg.toString());

        System.out.println();

        System.out.println("LineString Test:");
        System.out.println("\t" + lng_str);
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

   */
  @Override
  public Node parseRecord(ResultSet resultSet) {
    try {
      PGgeometry geom;
      Point point;
     
      geom = (PGgeometry) resultSet.getObject("geom");
      point = (Point) geom.getGeometry();
     
      return new Node(
View Full Code Here

        Double lon = m.getDouble(IngestMDB.LONGITUDE);
       
        PersonEntity person = new PersonEntity();
        person.setName(name);
        person.setSurname(surname);
        person.setLocation(new Point(lon, lat));
        person.setDate(new Date());
        entityManager.persist(person);
       
        // for tutorial info
        System.out.println("INGESTED " + name + " " + surname + " into PostGIS");
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.