Package org.geotools.grid.oblong
Class Oblongs
- Object
- 
- Oblongs
 
- 
 public class Oblongs extends Object A utility class with static methods to create and work with oblong grid elements.- Since:
- 2.7
- Author:
- mbedward
 
- 
- 
Constructor SummaryConstructors Constructor Description Oblongs()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static Oblongcreate(double minX, double minY, double width, double height, CoordinateReferenceSystem crs)Creates a newOblongobject.static SimpleFeatureSourcecreateGrid(ReferencedEnvelope bounds, double width, double height, double vertexSpacing, GridFeatureBuilder gridFeatureBuilder)Creates a new grid of oblongs within a bounding rectangle with grid elements represented by densified polygons (ie. additional vertices added to each edge).static SimpleFeatureSourcecreateGrid(ReferencedEnvelope bounds, double width, double height, GridFeatureBuilder gridBuilder)Creates a new grid of oblongs within a bounding rectangle with grid elements represented by simple (ie.
 
- 
- 
- 
Method Detail- 
createpublic static Oblong create(double minX, double minY, double width, double height, CoordinateReferenceSystem crs) Creates a newOblongobject.- Parameters:
- minX- the min X ordinate
- minY- the min Y ordinate
- width- the width
- height- the height
- crs- the coordinate reference system (may be- null)
- Returns:
- a new Oblongobject
- Throws:
- IllegalArgumentException- if either- widthor- heightare- <=0
 
 - 
createGridpublic static SimpleFeatureSource createGrid(ReferencedEnvelope bounds, double width, double height, GridFeatureBuilder gridBuilder) Creates a new grid of oblongs within a bounding rectangle with grid elements represented by simple (ie. undensified) polygons.- Parameters:
- bounds- the bounding rectangle
- width- oblong width
- height- oblong height
- gridBuilder- an instance of- GridFeatureBuilder
- Returns:
- a new grid
- Throws:
- IllegalArgumentException- if bounds is null or empty; or if either width or height is- <=0; or if the- CoordinateReferenceSystemsset for the bounds and the- GridFeatureBuilderare both non-null but different
 
 - 
createGridpublic static SimpleFeatureSource createGrid(ReferencedEnvelope bounds, double width, double height, double vertexSpacing, GridFeatureBuilder gridFeatureBuilder) Creates a new grid of oblongs within a bounding rectangle with grid elements represented by densified polygons (ie. additional vertices added to each edge).- Parameters:
- bounds- the bounding rectangle
- width- oblong width
- height- oblong height
- vertexSpacing- maximum distance between adjacent vertices in a grid element; if- <= 0or- >= min(width, height) / 2.0it is ignored and the polygons will not be densified
- gridFeatureBuilder- an instance of- GridFeatureBuilder
- Returns:
- the vector grid
- Throws:
- IllegalArgumentException- if bounds is null or empty; or if either width or height is- <=0; or if the- CoordinateReferenceSystemsset for the bounds and the- GridFeatureBuilderare both non-null but different
 
 
- 
 
-