Examples of CurveBoundaryImpl


Examples of org.geotools.geometry.iso.primitive.CurveBoundaryImpl

    List<Primitive> generator = this.getElements();
    if (generator == null)
      throw new IllegalArgumentException(
          "Could not create the boundary of CompositeCurve."); //$NON-NLS-1$
    HashSet<Complex> result = new HashSet<Complex>();
    result.add( new CurveBoundaryImpl( getCoordinateReferenceSystem(),
        new PointImpl( ((CurveImpl) generator
            .get(0)).getStartPoint()), new PointImpl( ((CurveImpl) generator
                .get(0)).getEndPoint()) ) );

    return result;
View Full Code Here

Examples of org.geotools.geometry.iso.primitive.CurveBoundaryImpl

    // Compare start point with end point
    if (start.equals(end))
      // the boundary is null if the composite curve is closed
      return null;
    else
      return new CurveBoundaryImpl(getCoordinateReferenceSystem(),
          new PointImpl(start),
          new PointImpl(end));
      //return this.getFeatGeometryFactory().getPrimitiveFactory().createCurveBoundary(start, end);
  }
View Full Code Here

Examples of org.geotools.geometry.iso.primitive.CurveBoundaryImpl

  /* (non-Javadoc)
   * @see org.opengis.geometry.primitive.CurveSegment#getBoundary()
   */
  public CurveBoundaryImpl getBoundary() {
    return new CurveBoundaryImpl(this.getCurve().getCoordinateReferenceSystem(),
        new PointImpl(this.getStartPoint()),
        new PointImpl(this.getEndPoint()) );
  }
View Full Code Here

Examples of org.geotools.geometry.jts.spatialschema.geometry.primitive.CurveBoundaryImpl

    /**
     * @inheritDoc
     * @see org.opengis.geometry.primitive.CurveSegment#getBoundary()
     */
    public CurveBoundary getBoundary() {
        return new CurveBoundaryImpl(null, new PointImpl(getStartPoint()), new PointImpl(getEndPoint()));
    }
View Full Code Here

Examples of org.geotools.geometry.jts.spatialschema.geometry.primitive.CurveBoundaryImpl

            com.vividsolutions.jts.geom.Coordinate [] coords = jtsBoundary.getCoordinates();
            // If coords is emtpy, then this geometry is a ring.  So we return
            // an empty CurveBoundary object (i.e. one with both points set to
            // null).
            if ((coords == null) || (coords.length == 0)) {
                CurveBoundaryImpl result = new CurveBoundaryImpl(
                        getCoordinateReferenceSystem(), null, null);
                return result;
            }
            else {
                // If it wasn't empty, then return a CurveBoundary with the two
                // endpoints.
                if (coords.length != 2) {
                    // Should this be an assert instead?
                    throw new RuntimeException("ERROR: One dimensional " +
                            "primitive had wrong number of boundary points (" +
                            coords.length + ")");
                }
                CoordinateReferenceSystem crs = getCoordinateReferenceSystem();
                CurveBoundaryImpl result = new CurveBoundaryImpl(crs,
                        new PointImpl(JTSUtils.coordinateToDirectPosition(
                                coords[0], crs)),
                        new PointImpl(JTSUtils.coordinateToDirectPosition(
                                coords[1], crs)));
                return result;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.