Class CoordinateSequenceDimensionFilter

  • All Implemented Interfaces:
    org.locationtech.jts.geom.CoordinateSequenceFilter

    public class CoordinateSequenceDimensionFilter
    extends Object
    implements org.locationtech.jts.geom.CoordinateSequenceFilter
    Filter on the dimension of each coordinate of the CoordinateSequence to determine the maximum coordinate dimension as well as whether the CoordinateSequence contains only 2D coordinates or mixed 2D and > 2D coordinates.
    Author:
    Erwan Bocher, Adam Gouge
    • Constructor Detail

      • CoordinateSequenceDimensionFilter

        public CoordinateSequenceDimensionFilter()
    • Method Detail

      • filter

        public void filter​(org.locationtech.jts.geom.CoordinateSequence seq,
                           int i)
        Specified by:
        filter in interface org.locationtech.jts.geom.CoordinateSequenceFilter
      • apply

        public static CoordinateSequenceDimensionFilter apply​(org.locationtech.jts.geom.Geometry geometry)
        Init CoordinateSequenceDimensionFilter object.
        Parameters:
        geometry - Geometry instance
        Returns:
        CoordinateSequenceDimensionFilter instance
      • getDimension

        public int getDimension()
        Gets the dimension of the coordinate sequence.
        Returns:
        a integer between 2 and 4.
      • isMixed

        public boolean isMixed()
      • is2D

        public boolean is2D()
      • setMAXDim

        public void setMAXDim​(int maxDim)
        Sets the maximum allowed dimension for the filter. The filter will stop after this dimension has been reached. Possible values are: CoordinateSequenceDimensionFilter.XY CoordinateSequenceDimensionFilter.XYZ CoordinateSequenceDimensionFilter.XYZM Default value is: CoordinateSequenceDimensionFilter.XYZM.
        Parameters:
        maxDim - a integer dimension
      • isDone

        public boolean isDone()
        Specified by:
        isDone in interface org.locationtech.jts.geom.CoordinateSequenceFilter
      • isGeometryChanged

        public boolean isGeometryChanged()
        Specified by:
        isGeometryChanged in interface org.locationtech.jts.geom.CoordinateSequenceFilter