Package ca.carleton.gcrc.geom

Examples of ca.carleton.gcrc.geom.Point


      // Create geometry if one is present in the EXIF
      // data and none is defined in the document
      if( exifData.containsLongLat()
       && false == docDescriptor.isGeometryDescriptionAvailable() ) {
       
        Point point = new Point(exifData.computeLong(),exifData.computeLat());
        MultiPoint mp = new MultiPoint();
        mp.addPoint(point);
       
        GeometryDescriptor geomDesc = docDescriptor.getGeometryDescription();
        geomDesc.setGeometry(mp);
View Full Code Here


      // Create geometry if one is present in the EXIF
      // data and none is defined in the document
      if( exifData.containsLongLat()
       && false == conversionContext.isGeometryDescriptionAvailable() ) {
       
        Point point = new Point(exifData.computeLong(),exifData.computeLat());
        MultiPoint mp = new MultiPoint();
        mp.addPoint(point);
       
        GeometryDescriptor geomDesc = conversionContext.getGeometryDescription();
        geomDesc.setGeometry(mp);
View Full Code Here

    }
   
    skipWhiteSpaces(br);
    popRightParen(br);

    Point point = new Point(positions);
    return point;
  }
View Full Code Here

      List<Number> positions = parsePositions(br);
      if( positions.size() < 2 ){
        throw new Exception("A point must have 2 or more positions");
      }

      Point point = new Point(positions);
      lineString.addPoint(point);
     
      if( checkForRightParen(br) ) {
        done = true;
      } else {
View Full Code Here

   
    boolean done = false;
    do {
      skipWhiteSpaces(br);
      if( checkForLeftParen(br) ) {
        Point point = parsePoint(br);
        multiPoint.addPoint(point);
      } else {
        List<Number> positions = parsePositions(br);
        if( positions.size() < 2 ){
          throw new Exception("A point must have 2 or more positions");
        }

        Point point = new Point(positions);
        multiPoint.addPoint(point);
      }

      if( checkForRightParen(br) ) {
        done = true;
View Full Code Here

      JSONArray coordinates = geometryObj.getJSONArray("coordinates");
      if( null == coordinates ) {
        throw new Exception("A geometry must contain an array called 'coordinates'");
      }
     
      Point point = new Point();
     
      for(int i=0,e=coordinates.length(); i<e; ++i){
        double position = coordinates.getDouble(i);
        point.addPosition(position);
      }
     
      return point;
     
    } catch(Exception e) {
View Full Code Here

     
      LineString lineString = new LineString();
     
      for(int pointIndex=0,pointEnd=points.length(); pointIndex<pointEnd; ++pointIndex){
        JSONArray coordinates = points.getJSONArray(pointIndex);
        Point point = new Point();
        for(int coordIndex=0,coordEnd=coordinates.length(); coordIndex<coordEnd; ++coordIndex){
          double position = coordinates.getDouble(coordIndex);
          point.addPosition(position);
        }
        lineString.addPoint(point);
      }
     
      return lineString;
View Full Code Here

        JSONArray points = lineStrings.getJSONArray(lsIndex);
        LineString lineString = new LineString();
     
        for(int pointIndex=0,pointEnd=points.length(); pointIndex<pointEnd; ++pointIndex){
          JSONArray coordinates = points.getJSONArray(pointIndex);
          Point point = new Point();
          for(int coordIndex=0,coordEnd=coordinates.length(); coordIndex<coordEnd; ++coordIndex){
            double position = coordinates.getDouble(coordIndex);
            point.addPosition(position);
          }
          lineString.addPoint(point);
        }
       
        polygon.addLinearRing(lineString);
View Full Code Here

     
      MultiPoint multiPoint = new MultiPoint();
     
      for(int pointIndex=0,pointEnd=points.length(); pointIndex<pointEnd; ++pointIndex){
        JSONArray coordinates = points.getJSONArray(pointIndex);
        Point point = new Point();
        for(int coordIndex=0,coordEnd=coordinates.length(); coordIndex<coordEnd; ++coordIndex){
          double position = coordinates.getDouble(coordIndex);
          point.addPosition(position);
        }
        multiPoint.addPoint(point);
      }
     
      return multiPoint;
View Full Code Here

        JSONArray points = lineStrings.getJSONArray(lsIndex);
        LineString lineString = new LineString();
     
        for(int pointIndex=0,pointEnd=points.length(); pointIndex<pointEnd; ++pointIndex){
          JSONArray coordinates = points.getJSONArray(pointIndex);
          Point point = new Point();
          for(int coordIndex=0,coordEnd=coordinates.length(); coordIndex<coordEnd; ++coordIndex){
            double position = coordinates.getDouble(coordIndex);
            point.addPosition(position);
          }
          lineString.addPoint(point);
        }
       
        multiLineString.addLineString(lineString);
View Full Code Here

TOP

Related Classes of ca.carleton.gcrc.geom.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.