Class PointCollection<E extends PointCollection<E>>

    • Field Detail

      • points

        protected final ArrayList<Coordinate> points
      • translated

        protected boolean translated
    • Constructor Detail

      • PointCollection

        protected PointCollection()
      • PointCollection

        protected PointCollection(ArrayList<Coordinate> points)
    • Method Detail

      • point

        public E point(double longitude,
                       double latitude)
        Add a new point to the collection
        Parameters:
        longitude - longitude of the coordinate
        latitude - latitude of the coordinate
        Returns:
        this
      • point

        public E point(Coordinate coordinate)
        Add a new point to the collection
        Parameters:
        coordinate - coordinate of the point
        Returns:
        this
      • points

        public E points(Coordinate... coordinates)
        Add a array of points to the collection
        Parameters:
        coordinates - array of Coordinates to add
        Returns:
        this
      • points

        public E points(Collection<? extends Coordinate> coordinates)
        Add a collection of points to the collection
        Parameters:
        coordinates - array of Coordinates to add
        Returns:
        this
      • coordinates

        protected Coordinate[] coordinates(boolean closed)
        Copy all points to a new Array
        Parameters:
        closed - if set to true the first point of the array is repeated as last element
        Returns:
        Array of coordinates
      • coordinatesToXcontent

        protected XContentBuilder coordinatesToXcontent(XContentBuilder builder,
                                                        boolean closed)
                                                 throws IOException
        builds an array of coordinates to a XContentBuilder
        Parameters:
        builder - builder to use
        closed - repeat the first point at the end of the array if it's not already defines as last element of the array
        Returns:
        the builder
        Throws:
        IOException -