Package org.geotools.grid
Class Lines
Object
Lines
A utility class to create line grids with basic attributes.
- Since:
- 8.0
- Author:
- mbedward
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleFeatureSourcecreateOrthoLines(ReferencedEnvelope bounds, Collection<OrthoLineDef> lineDefs) Creates a grid of ortho-lines.static SimpleFeatureSourcecreateOrthoLines(ReferencedEnvelope bounds, Collection<OrthoLineDef> lineDefs, double vertexSpacing) Creates a grid of ortho-lines.static SimpleFeatureSourcecreateOrthoLines(ReferencedEnvelope bounds, Collection<OrthoLineDef> lineDefs, double vertexSpacing, GridFeatureBuilder lineFeatureBuilder) Creates a grid of ortho-lines.
-
Constructor Details
-
Lines
public Lines()
-
-
Method Details
-
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:
-
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 ofvertexSpacinggreater 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 ofvertexSpacinggreater 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
-