Package org.geotools.grid
Class Lines
- Object
-
- Lines
-
public class Lines extends Object
A utility class to create line grids with basic attributes.- Since:
- 8.0
- Author:
- mbedward
-
-
Constructor Summary
Constructors Constructor Description Lines()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SimpleFeatureSource
createOrthoLines(ReferencedEnvelope bounds, Collection<OrthoLineDef> lineDefs)
Creates a grid of ortho-lines.static SimpleFeatureSource
createOrthoLines(ReferencedEnvelope bounds, Collection<OrthoLineDef> lineDefs, double vertexSpacing)
Creates a grid of ortho-lines.static SimpleFeatureSource
createOrthoLines(ReferencedEnvelope bounds, Collection<OrthoLineDef> lineDefs, double vertexSpacing, GridFeatureBuilder lineFeatureBuilder)
Creates a grid of ortho-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 envelopelineDefs
- 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 ofvertexSpacing
greater than zero; if so, any lines more than twice as long as this value will be densified.- Parameters:
bounds
- the bounding envelopelineDefs
- one or more ortho-line definitionsvertexSpacing
- 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 ofvertexSpacing
greater than zero; if so, any lines more than twice as long as this value will be densified.- Parameters:
bounds
- the bounding envelopelineDefs
- one or more ortho-line definitionsvertexSpacing
- maximum distance between adjacent vertices along a linelineFeatureBuilder
- feature build to create line features- Returns:
- the vector grid of lines
-
-