Class Lines


  • public class Lines
    extends Object
    A utility class to create line grids with basic attributes.
    Since:
    8.0
    Author:
    mbedward
    • Constructor Detail

      • Lines

        public Lines()
    • Method Detail

      • createOrthoLines

        public static SimpleFeatureSource createOrthoLines​(ReferencedEnvelope bounds,
                                                           Collection<OrthoLineDef> lineDefs)
        Creates a grid of ortho-lines. Lines are parallel to the bounding envelope's X-axis, Y-axis or both according to the provided line definitions.
        Parameters:
        bounds - the bounding envelope
        lineDefs - one or more ortho-line definitions
        Returns:
        the vector grid of lines
        See Also:
        OrthoLineDef
      • createOrthoLines

        public static SimpleFeatureSource createOrthoLines​(ReferencedEnvelope bounds,
                                                           Collection<OrthoLineDef> lineDefs,
                                                           double vertexSpacing)
        Creates a grid of ortho-lines. Lines are parallel to the bounding envelope's X-axis, Y-axis or both according to the provided line definitions. Densified lines (lines strings with additional vertices along their length) can be created by setting the value of vertexSpacing greater than zero; if so, any lines more than twice as long as this value will be densified.
        Parameters:
        bounds - the bounding envelope
        lineDefs - one or more ortho-line definitions
        vertexSpacing - maximum distance between adjacent vertices along a line
        Returns:
        the vector grid of lines
      • createOrthoLines

        public static SimpleFeatureSource createOrthoLines​(ReferencedEnvelope bounds,
                                                           Collection<OrthoLineDef> lineDefs,
                                                           double vertexSpacing,
                                                           GridFeatureBuilder lineFeatureBuilder)
        Creates a grid of ortho-lines. Lines are parallel to the bounding envelope's X-axis, Y-axis or both according to the provided line definitions. Line features will be created using the supplied feature builder. Densified lines (lines strings with additional vertices along their length) can be created by setting the value of vertexSpacing greater than zero; if so, any lines more than twice as long as this value will be densified.
        Parameters:
        bounds - the bounding envelope
        lineDefs - one or more ortho-line definitions
        vertexSpacing - maximum distance between adjacent vertices along a line
        lineFeatureBuilder - feature build to create line features
        Returns:
        the vector grid of lines